Ejemplo n.º 1
0
 public void Delete(Receipt entity)
 {
     using (BCafeContext bCafeEntities = new BCafeContext())
     {
         var result = bCafeEntities.Entry(entity);
         result.State = EntityState.Deleted;
         bCafeEntities.SaveChanges();
     }
 }
Ejemplo n.º 2
0
 public void Update(Desk entity)
 {
     using (BCafeContext bCafeEntities = new BCafeContext())
     {
         var result = bCafeEntities.Entry(entity);
         result.State = EntityState.Modified;
         bCafeEntities.SaveChanges();
     }
 }
Ejemplo n.º 3
0
 public void Add(Staff entity)
 {
     using (BCafeContext bCafeEntities = new BCafeContext())
     {
         var result = bCafeEntities.Entry(entity);
         result.State = EntityState.Added;
         bCafeEntities.SaveChanges();
     }
 }