I would like to know how to delete an object from Entity Framework 4.1 without first having to load the object from the database. I have found these other 2 answers on Stack Ove
The following code works well for me:
var c = db.Set().Find(id); db.Entry(c).State = EntityState.Deleted; db.SaveChanges();
If this object wasn't tracked previously by the DbContext then it would hit the database, otherwise it would find it in memory.