Linq-单条数据删除
单条数据删除,用DeleteOnSubmit
NorthwindDataContext db = new NorthwindDataContext(); Customer test1 = ctx.Customers.Single(c => c.CustomerID == 1); db.t_sysrole.DeleteOnSubmit(test1); db.SubmitChanges();
单条数据删除,用DeleteOnSubmit
NorthwindDataContext db = new NorthwindDataContext(); Customer test1 = ctx.Customers.Single(c => c.CustomerID == 1); db.t_sysrole.DeleteOnSubmit(test1); db.SubmitChanges();