EF to sql string sql = "select T_Task.BSID,T_Task.CloseDate,T_Task.CompleteDate,T_Task.CloseUser,T_Task.TaskID,T_BaseStation.Name from T_Task " + "inner join T_BaseStation on T_Task.BSID=T_BaseStation.BSID"+ " where " + sqlta…
EF中使用SQL语句或存储过程 1.无参数查询var model = db.Database.SqlQuery<UserInfo>("select* from UserInfoes ").ToList(); 2.有参查询var model = db.Database.SqlQuery<UserInfo>("select* from UserInfoes where id=@ID ",new SqlParameter("@ID&quo…