0
votes

Can we "reverse engineer" a SQLCE (SQL Server Compact Edition) database using Entity Framework?

I've followed the MSDN Development Center tutorial Code First to an Existing Database on using the Entity Framework to "reverse engineer" a database so that we can use code-first with it. As per the tutorial I've:

  1. Installed the Entity Framework Power Tools.
  2. Generated an application (Empty MVC4) in Visual Studio 2012.
  3. Added a database (I need to use SQLCE).
  4. Right-clicked the root project folder and selected Entity Framework > Reverse Engineer Code First.
  5. When the Connection Properties window pops up I changed the DataSource type to 'Microsoft SQL Server Compact 4.0.
  6. Browse to the Project App_Data folder and select the SQLCE database.
  7. Test the connection (success) and click Ok.

Then the following error is thrown:

System.ArgumentException: 
The modelEntityContainerName parameter '...\App_Data\cesdfContext' contains characters that are not valid.
1
It is a known issue, will be fixed in EF6: entityframework.codeplex.com/workitem/366 - ErikEJ

1 Answers

0
votes

Confirmed by following the link provided in the comment (by (thanks and credit to(ErikEJ)) to my original post that this issue is to be fixed in the Entity Framework 6 release.