Jonathan Escobedo
Jonathan Escobedo

Reputation: 4063

EF 4.1 stored procedure not available?

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?

Upvotes: 3

Views: 796

Answers (1)

Ladislav Mrnka
Ladislav Mrnka

Reputation: 364369

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.

Upvotes: 5

Related Questions