This project is read-only.

bug on child models when using modules

Dec 8, 2012 at 7:08 PM
Edited Dec 8, 2012 at 7:10 PM

I have declered a module named "Parties" in the designer. 

Within the designer i have added 2 models with a parent child inheritance relation :



where Person model inherits from BaseParty model. 

but when i try to delete a person object using the following code 


 var startup = new ContextStartup("sa");
 using (var db = new DataEntities(startup, cnnstr))

   var party = db.Person.FirstOrDefault(x => x.ID == id);
     if (party != null)



i get an exception on line " db.SaveChanges();"

the exception says : 

"Could not find stored procedure 'dbo.gen_BaseParty_Delete'."

looking at the db there is no stored proc with that name , but there is a stored proc : 


so i guess there is some confusion with names when using the modules feature.


Dec 12, 2012 at 1:55 AM

You are correct. This has been corrected and will be in the next version. You can alternatively turn off stored procedure CRUD all together. This is what Entity Framework does by default anyway. Turn them off on the model and you will have no stored procs. In any case this issue is resolved and will be deployed soon.

Dec 13, 2012 at 7:49 AM
Edited Dec 13, 2012 at 7:54 AM


As i workaround  i used the static method Person.DeleteData(x=>x.Id==id)

and it worked out fine.

Will continue this way until new version comes around.