I have a Entity framework project created with Entity Developer 2.05beta.
I can select a stored procedure from the database explorer and drag that on the design surface. The project validates and generates succesfully.
Running code against the generated class I get a mapping exception error when opening the connection on the datacontext object even before I can call the method.
using (DavinciModelEntities entities = new DavinciModelEntities())
{
if (entities.Connection.State != ConnectionState.Open)
entities.Connection.Open();
entities.Getmastersdetail( ....)
System.Data.MappingException was unhandled
Message="Schema specified is not valid. Errors: \r\nModel.msl(4,6) : error 2055: Storage function has a parameter 'INMASTER_PDC' but no corresponding parameter was found in the FunctionImport.\r\nModel.msl(4,6)
Below extract of my ssdl :
csdl :
msl :
Where/how do I need to map the parameters. Should the Entity developer not generate the mappings for the parameters automatically ?
Mapping Exception : no corresponding parameter was found
Thank you for the report, we have reproduced the problem.
It is associated with naming rules.
As a temporary workaround you can regenerate the model turning off all naming rules before adding the procedures to your model.
As an alternative workaround, rename all parameters in the CSDL part of the model in correspondence with the SSDL part using any XML Editor you like.
It is associated with naming rules.
As a temporary workaround you can regenerate the model turning off all naming rules before adding the procedures to your model.
As an alternative workaround, rename all parameters in the CSDL part of the model in correspondence with the SSDL part using any XML Editor you like.