Actually i solved the problem. It was because the idField of the table i was using was incorrect. it appears that the getSelections uses the idField property so you need to make sure that the idField is actually the same as the one passed in the json…
一: 执行sql语句,返回受影响的行数 在mysql里面,如果没有影响,那么返回行数为 -1 ,sqlserver 里面 还没有测试过 using (var ctx = new MyDbContext()) { ctx.Database.ExecuteSqlCommand("UPDATE Person SET Name = 'Michael' WHERE PersonID = 1"); } 二 : Database.SqlQuery<T> EF5执行sql查询语句…