{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/5947","repository_url":"https://api.github.com/repos/aspnet/EntityFramework","labels_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/5947/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/5947/comments","events_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/5947/events","html_url":"https://github.com/aspnet/EntityFramework/issues/5947","id":163474128,"number":5947,"title":"Scaffold-DbContext: Forcing CamelCase, possible to override?","user":{"login":"toddtsic","id":9937583,"avatar_url":"https://avatars.githubusercontent.com/u/9937583?v=3","gravatar_id":"","url":"https://api.github.com/users/toddtsic","html_url":"https://github.com/toddtsic","followers_url":"https://api.github.com/users/toddtsic/followers","following_url":"https://api.github.com/users/toddtsic/following{/other_user}","gists_url":"https://api.github.com/users/toddtsic/gists{/gist_id}","starred_url":"https://api.github.com/users/toddtsic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toddtsic/subscriptions","organizations_url":"https://api.github.com/users/toddtsic/orgs","repos_url":"https://api.github.com/users/toddtsic/repos","events_url":"https://api.github.com/users/toddtsic/events{/privacy}","received_events_url":"https://api.github.com/users/toddtsic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":28,"created_at":"2016-07-01T21:07:18Z","updated_at":"2016-09-28T22:43:47Z","closed_at":null,"body":"### Steps to reproduce\r\nScaffold-DbContext \"Server=.\\ss2016;Database=tsiccore;Trusted_Connection=True;\" -o \"Models/DatabaseModels\" Microsoft.EntityFrameworkCore.SqlServer\r\n\r\n### The issue\r\nDatabase Table named for example: Job_Menus results in:\r\n public partial class JobMenus\r\n    {\r\n\r\nColumn Name for ex: menu_type_id results in:\r\npublic int MenuTypeId { get; set; }\r\n\r\n```\r\nException message:\r\n\r\n### Further technical details\r\n\r\nI'm porting pre RC1 project with thousands of references to context objects (with lower case leading characters and with underscores). \r\n\r\nIs there a command line option to allow objects to be named as they are in the SQL Server db?\r\n\r\nThanks,\r\nTodd"},"comment":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/comments/250323188","html_url":"https://github.com/aspnet/EntityFramework/issues/5947#issuecomment-250323188","issue_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/5947","id":250323188,"user":{"login":"codearoo","id":1846799,"avatar_url":"https://avatars.githubusercontent.com/u/1846799?v=3","gravatar_id":"","url":"https://api.github.com/users/codearoo","html_url":"https://github.com/codearoo","followers_url":"https://api.github.com/users/codearoo/followers","following_url":"https://api.github.com/users/codearoo/following{/other_user}","gists_url":"https://api.github.com/users/codearoo/gists{/gist_id}","starred_url":"https://api.github.com/users/codearoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codearoo/subscriptions","organizations_url":"https://api.github.com/users/codearoo/orgs","repos_url":"https://api.github.com/users/codearoo/repos","events_url":"https://api.github.com/users/codearoo/events{/privacy}","received_events_url":"https://api.github.com/users/codearoo/received_events","type":"User","site_admin":false},"created_at":"2016-09-28T22:43:47Z","updated_at":"2016-09-28T22:43:47Z","body":"So in the same philosophy, but not exactly the same item..  it would be nice if the Scaffolding scripts would not care if it can't find a primary key or even work with a view. If you just remove the requirement, you'd allow people to gain from the automation that it does do. It could just spit out warnings in the code or something, showing the developer that they can't do certain things, or they have to fix them but better than ended up with nothing output.\r\n\r\nAnd in order for me to use a VIEW, I had to temporarily create a TABLE of the view I wanted, just so the scaffolding could find it.. (on and I have to set a primary key too) and then I manually changed the resulting code to just use the VIEW (which obviously has no \"primary key\" cause it's just created by SQL) and it works great. Of course I'm not going to write methods to update anything in here. I don't even need to keep the [Key] attribute for my purpose which is just to get the output from this view."}}
{"actor":{"display_login":"codearoo"}}