We created a prototype to our Web store in MVC 3 and EF (4.1 I think). The EF model was created
Turns out our CTO wants all production SQL executed with stored procedures to avoid exposing table names and fields.
Does anyone have advice on how I can introduce stored procedures with minimal disturbance to my C# / EF code?
You can import them into the EDMX model, as function imports, and use the mapping functions to map them to Insert/Update/Delete of the entities.
If you have any custom behaviour in stored procedures, you can execute the SP using
ExecuteFunctionYou shouldn’t have too much disruption above the Entity layer, but be aware that EF is quite inflexible in what parameters it wants Stored Procedures defined with
http://msdn.microsoft.com/en-us/library/bb896231.aspx