Using Transactions you can solve your problms
using System.Transactions; /Inculde this Directory and Reference
using (TransactionScope trans = new TransactionScope())
{
try
{
using (DBEntities en = new DBEntities())
{
}
trans.Complete();
}
catch (Exception ex)
{
trans.Dispose();
}
}