This is continue from part 3 (Update from LINQ to Entities). This part is the last for the entire CRUD.
The code will work for both .NET Framework 3.5 or 4.0.
The complete code.
//Define an entity object
BeancurdEntities entBC = new BeancurdEntities();
//Retireve the row with the identity
Beancurds bc = entBC.Beancurds.First(b => b.BeancurdID == 1);
The code above delete the beancurd where the beabcurd ID is equal to 1.