-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.NET5 Scaffold-DbContext - Lower case naming issue. #24040
Comments
Feel free to share schema privately, and I will investigate. |
Here is the code that will give you the same exact results. There is really nothing to it... Appreciate the help @ErikEJ @smitpatel Create Table Then in VS > Package Manager Console run: |
I would be surprised if that is enough to repro. What is "Training2" ? |
All you need is one table named Training and the uppercase T disappears. Training2 was just a test proving that it works fine unless the word is just Training. Like I said this is very simple to reproduce and very strange result. With all due respect I put the time into giving you an example. What kind of response is, you don't think this is enough to reproduce, if you didn't try it? |
Just to be clear, this is the new .NET5 EF5 new release version. Worked fine in CORE 3. |
Thanks, I will give it a try. What locale is your OS? |
It looks like a bug in the default Humanizer pluralizer, you can add |
You know that was going to be my first guess since it worked in 3.0 and the plural seem to come out with five. I was going to mention something but I didn't want to just guess. Really appreciate the time and I had no clue about that flag so that will come in very handy. Since it's a bug is there anything I can do to get it on the to-do list for fixing? |
I think we'd need to file a bug https://github.com/Humanizr/Humanizer, @ErikEJ do you want to do the honors? :) |
Sure, I will file a bug! |
Thanks guys I really appreciate the help and time on this one. |
Thanks @ErikEJ - please post the link to it here in case people land here. |
Bug report created here: Humanizr/Humanizer#1030 |
Table [ref].[Training] get converted to object name lower case training, really strange one here, checked the PK/FK everything is upper case T. Why would it pick just this table out of 100 tables to lower case the name "training"?
Scaffold-DbContext "Server=localhost;Database=XXX;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models -Context Context -ContextDir Models -Force
Tried with and without "-UseDatabaseName". Same results.
Soooooo strange!
The text was updated successfully, but these errors were encountered: