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