Error reached after genereated entity framework classes by edmgen tool

Posted by loviji on Stack Overflow See other posts from Stack Overflow or by loviji
Published on 2010-05-20T09:10:58Z Indexed on 2010/05/20 9:20 UTC
Read the original article Hit count: 527

Hello, First I read this question, but this knowledge did not help to solve my problems.

In initial I've created edmx file by Visual Studio. Generated files with names:

  • uqsModel.Designer.cs
  • uqsModel.edmx

This files are located on App_Code folder.

And my web app work normally. In Web Config generated connectionstring automatically.

<add name="uqsEntities" connectionString="metadata=res://*/App_Code.uqsModel.csdl|res://*/App_Code.uqsModel.ssdl|res://*/App_Code.uqsModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=aemloviji\sqlexpress;Initial Catalog=uqs;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" /></connectionStrings>

Then I had to generate classes by the instrument edmgen tool(full generation mode). Generated new files with names:

  • uqsModel.cs
  • uqsModel.csdl
  • uqsModel.msl
  • uqsModel.ssdl
  • uqsViews.cs

it save new classed to the folder where edmx files located before, and remove existing edmx files. And when page redirrects to any web page server side code fails. And problem: Unable to load the specified metadata resource.

Some idea, please.

© Stack Overflow or respective owner

Related posts about entity-framework

Related posts about entity-framework-4