Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用模板,如何在同一个 Delete 语句中从表中删除多条记录?
您的问题有点模棱两可,但根据您发布的另一个问题,我认为您正试图根据 Id 列表或类似内容进行删除。您可以使用流利的查询来做到这一点,如下所示:
List<int> peopleIds = new List<int> { 121, 122, 35, 4 }; new SubSonic.Query.Delete<Person>(new MyDB().Provider) .Where(PersonTable.IdColumn).In(peopleIds) .Execute();