سؤال

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?

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top