Using the entity framework with a MySQL DB and the model designer doesn't pickup stored proc parameters

前端 未结 7 1899
梦谈多话
梦谈多话 2021-01-13 08:34

I\'ve got the latest Mysql connector that allows you to use the Visual Studio Entity Framework designer. It\'s been working great, but I just added a stored proc.

7条回答
  •  爱一瞬间的悲伤
    2021-01-13 08:55

    It was my solution to call a stored procedure. I hope usefull.

    MovieDbEntities db = new MovieDbEntities();
    int id = 2;
    var result = db.Movie.SqlQuery($"CALL SP_ReadMovie({id})").ToList();
    

提交回复
热议问题