Mapping Exception : no corresponding parameter was found
Posted: Wed 04 Mar 2009 22:07
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 ?
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 ?