I have a base table and an inherited table in my Entity Framework model. Currently, I am using two seperate stored procedures to insert data into each table - so a stored procedure must be called to insert into the base table, then a seperate stored procedure is called to insert into the derived table. I cannot seem to get EF to do this - if I leave my stored procedure mappings off, EF will successfully insert a row into the base table, then a row into the derived table. However, as soon as I map each table to stored procedures, only the derived table insert is being called. I verified in SQL Profiler that only the derived table stored procedure is being called (or, quite possibly, it is being called first, which is causing an error because I need the base record inserted first). Is this scenario supported in Entity Framework, or am I required to have a single stored procedure call to map both base and derived table at once?
View Complete Post