Last post Dec 29, 2011 08:57 AM by gopalanmani
Dec 27, 2011 08:25 AM|romulojordao|LINK
Hey guys, i have a empty database in a server and want generate the tables with code first, but im getting this error:
Description: An unhandled exception occurred during the execution of the current web request. Please
review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NotSupportedException: Model compatibility cannot be checked because the database does not contain model metadata. Ensure that IncludeMetadataConvention has been added to the DbModelBuilder conventions.
I tried this: modelBuilder.Conventions.Remove<IncludeMetadataConvention>();
and tried this too: DropCreateDatabaseAlways
but not worked...
anyone know a solution to my app generate the tables in a existing database?
Dec 27, 2011 10:30 PM|Lannie|LINK
You have not specified what database you are using.
Dec 29, 2011 08:57 AM|gopalanmani|LINK
Found a easier workaround here. I hope this helps.