EF Code-First - Stored Procedure Mapping

I am trying to implement nested sets in my database model. To make it easier to use, I would like to create stored procedures for insert / update / delete operations on my tree nodes so that my tree is in the correct state.

Is it possible to create a mapping of stored procedures in the current version of the first model code? I mean, my stored procedures will be called when, for example, a new object is added to dbcontext.

+4
source share
1 answer

First code in the Entity Framework does not support the default stored procedure. Since there is no designer, we cannot even map our saved procs to an object. There are many scenarios that we saw where we are associated with using the stored procedure for any database modifications (Insert / Update / Delete).

You can use the links below and / or Google your question to find more solutions.

Using Entity Structure Code First with Stored Procedures AND Code First 4.1: Using a Stored Procedure to Insert Data

+4
source

All Articles