Pergunta

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?

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top