-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Updated project from RC1 to RC2. Invalid object name 'TableName' #4979
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
Comments
@Bartmax this is just a guess but is the correct name of the table "Announcement" (without the "s")? For RC2 we are making a change to automatically infer the default names from the names of the |
BTW if you want to go back to the naming from RC1, so that your model and database work together without issues, then just put this code at the start of foreach (var entity in modelBuilder.Model.GetEntityTypes())
{
entity.Relational().TableName = entity.ClrType.Name;
} |
That was exactly my issue. Thanks. Now, I think this will be good to be mentioned on a migration document. I want to be able to use the new RC2 table name conventions, what is the suggested approach for my scenario here? Create a new empty migration and add the renames by hand? will that work? |
just in time an announcement were created. Closing. |
and when launching I get this error:
database has correct schema/data
Modification i made to the project:
on project json.
startup.cs:
I had to add a new constructor to dbcontext like this:
and I don't remember anything else I changed (related to ef)
dnvm list
dotnet --info
testing running it doing
dotnet run
.The text was updated successfully, but these errors were encountered: