using (var db = new dbEntities()) { //第一个坑,需要手动open db.Database.Connection.Open(); using (var tran = db.Database.Connection.BeginTransaction()) { //第二个坑,要自己创建command,然后把tran赋值给command var commd= db.Database.Connection.CreateCommand(); commd.Transacti…
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…