Exemplo n.º 1
0
 public void Delete(long id)
 {
     using (var context = new CashFlowContext())
     {
         var transfer = context.Transfer.FirstOrDefault(t => t.Id == id);
         if (transfer != null)
         {
             context.Remove(transfer);
             context.SaveChanges();
         }
     }
 }
Exemplo n.º 2
0
 public void Delete(long id)
 {
     using (var context = new CashFlowContext())
     {
         var Account = context.Account.FirstOrDefault(t => t.Id == id);
         if (Account != null)
         {
             context.Remove(Account);
             context.SaveChanges();
         }
     }
 }