The text of this article is not in this database — only its details are. Read it on the old site: Delete an Object Without Retrieving it in Entity Framework 6.0
9 Comments
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.

Nadeem ShehzadPosted May 20, 2015, 11:27 AM
Will option #1 perform cascade delete like Remove on the Dbset, or leave the records orphans in the child tables
Andrew KlinmanPosted Mar 28, 2015, 8:26 PM
I tried the #1 approach and it doesn't seem to work. I don't get an error, and if I refresh my grid by querying, the row is gone. However, when I run the program again, the row is back, and of course it's still in the DB.
Ramesh MaruthiPosted Jul 21, 2014, 10:19 AM
Thanks Jignesh Sir !! Let me try with this :)
Ramesh MaruthiPosted Jul 18, 2014, 11:21 AM
Jignesh now days I am working on entity framework 6.0.1 , How this scenario works for bulk delete without retrieving from a database ? for an example I pass an array of ids , how does this work ? And if use where with parallel linq, I think it takes the same time DepartmentMaster deptDelete = Context.DepartmentMaster.Where (s =>s.DepartmentID == 9)); Context.DepartmentMasters.Remove(deptDelete); Context.SaveChanges(); SOrry if am wrong
Mahesh ChandPosted Jul 17, 2014, 5:49 PM
Nice to see Jignesh working with EF6.