📜  实体框架与查询 c# 代码示例

📅  最后修改于: 2022-03-11 14:49:10.329000             🧑  作者: Mango

代码示例2
using (var ctx = new SchoolDBEntities())
{
    var studentName = ctx.Students.SqlQuery("Select studentid, studentname, standardId from Student where studentname='Bill'").FirstOrDefault();
}    
//https://www.entityframeworktutorial.net/Querying-with-EDM.aspx
//https://www.entityframeworktutorial.net/EntityFramework4.3/raw-sql-query-in-entity-framework.aspx