-3

I want to delete multiple records in single linq query. I find the way but its using foreach loop to delete. I want the way like sql delete all the records in single query.

Karishma
  • 1
  • 3

1 Answers1

-2

Below link may help you, please have a look at it

obj.tblA.Where(x => x.fid == i).ToList().ForEach(obj.tblA.DeleteObject); obj.SaveChanges();

How to Delete multiple records in Linq to Entity?

Regards, Meet

Community
  • 1
  • 1
Meet
  • 159
  • 4