linq to sql batch delete

后端 未结 4 1203
一生所求
一生所求 2021-01-13 01:06

I have the following DB: Posts which have an Id, Tags also with Id, and TagsToPosts table which have T

4条回答
  •  盖世英雄少女心
    2021-01-13 01:40

    PLINQO supports batch delete operations without retrieving the entities first.

    var delete = from t in TagsToPost select t).Except(from nt in newList select nt, new TagComparer())

    context.Tags.Delete(delete);

    http://plinqo.com

提交回复
热议问题