I've tried to use Entity Frameworks Power Tools Reverse Engineer Code First for a SQLServer database and received the following error:
System.ArgumentException: The modelEntityContainerName parameter 'testContext' contains characters that are not valid.
at System.Data.Entity.Design.EntityModelSchemaGenerator..ctor(EntityContainer storeEntityContainer, String namespaceName, String modelEntityContainerName)
at Microsoft.DbContextPackage.Handlers.ReverseEngineerCodeFirstHandler.ReverseEngineerCodeFirst(Project project)
Is there something I can do to continue or avoid this error or work around it.
Thanks.
I had the same problem. My database was named sots-version-005, and the code was not escaping the name. The answer is to rename the database, and hopefully you are in a development environment where that is easy to do.
I used SQL Management Studio, right-clicked on the database, and renamed it 'sots5', eliminating all characters except alphanumerics.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With