Question

The Ado.NET Team has recently release the version fo EF 4.1 they said that stored procedure are not available!! But Raw SQL queries are still supporting stored procedure right?

var rs = db.Database.SqlQuery<Doc>(
            "EXECUTE docsByPeriod @param={0}", parameters: period).ToList();

So this code will work or not?

Was it helpful?

Solution

Yes you can execute any SQL (including stored procedures) by SqlQuery. The announcement about not supported SP means that you can't map SP procedures to Insert, Update, Delete operations performed on your entity as currently possible in EDMX.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top