EF 4.1 stored procedure not available?

Ado.NET team recently released a version for EF 4.1 , they said that the stored procedure is not available !! But do Raw SQL queries still support the stored procedure?

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

So will this code work or not?

+3
source share
1 answer

Yes, you can execute any SQL (including stored procedures) on SqlQuery. Declaring an unsupported SP means that you cannot map SP procedures for Insert, Update, Delete operations performed on your entity, as is currently possible in EDMX.

+5
source

All Articles