日期:2014-05-20 浏览次数:20907 次
List<int> delUserIds = new List<int>;//自己赋值 List<user> users = udc.user.Where(u => u.id in delUserIds ); foreach(user delUser in users) { udc.user.DeleteOnSubmit(user); udc.SubmitChanges(); }
------解决方案--------------------
http://www.cnblogs.com/jeffreyzhao/archive/2008/03/05/linq-to-sql-batch-delete-extension.html
------解决方案--------------------
DeleteAllOnSubmit
------解决方案--------------------
DeleteOnSubmit