首页 > 代码库 > Linq批量删除数据

Linq批量删除数据

 public void DeleteNews(List<string> IDList)        {                        using (ETCDataContext etcDataContext = this.EtcDataContext)            {                var news = etcDataContext.SYS_News.Where(o => IDList.Contains(o.ID.ToString()));                etcDataContext.SYS_News.DeleteAllOnSubmit(news);                etcDataContext.SubmitChanges();            }        }

 

Linq批量删除数据