Stored Procedures and EF Code First

前端 未结 4 1921
谎友^
谎友^ 2021-02-14 02:23

I would like to use a stored procedure to retrieve entities from a DB, I don\'t care about tracking changes. I just need all entities be resolved including related ones.

<
4条回答
  •  遥遥无期
    2021-02-14 02:45

    Stored Procedures are not supported in Code First. So yes, you'll have to use SqlCommand or whatever your DB of choice provides if you intend on using Code First.

    Stored Procedures ARE supported in DB First or Model First.

提交回复
热议问题