mercoledì 19 marzo 2014

LINQ to entities - Error occured update the entries

C# .NET Framework 4.0, Linq to entities

I have an application that uses Linq to entities for accessing to a SQL Server 2008 database, naturally this application works fine. Therefore, I deploy it in a system where there is SQL 2005 express and not SQL Server 2008 and my application gives the follow exception:

Message: An error occurred while updating the entries. See the inner exception for details.

The solution is:

  • Open the entity data model, for example Model.edmx, with a XML Editor.
  • Change the attribute ProviderManifestToken (Schema element -> <Schema)
  • Rebuild and re-deploy the assembly.

It works fine for me.