Esempio n. 1
0
 public void Update(Brand entity)
 {
     using (RecapProjectContext context = new RecapProjectContext())
     {
         context.Entry(entity).State = EntityState.Modified;
         context.SaveChanges();
     }
 }
Esempio n. 2
0
 public void Delete(Color entity)
 {
     using (RecapProjectContext context = new RecapProjectContext())
     {
         context.Entry(entity).State = EntityState.Deleted;
         context.SaveChanges();
     }
 }
Esempio n. 3
0
 public void Add(Car entity)
 {
     using (RecapProjectContext context = new RecapProjectContext())
     {
         context.Entry(entity).State = EntityState.Added;
         context.SaveChanges();
     }
 }