Exemple #1
0
 public void Delete(Brand entity)
 {
     using (ReCapProjectERContext context = new ReCapProjectERContext())
     {
         var deletedEntity = context.Entry(entity);
         deletedEntity.State = EntityState.Deleted;
         context.SaveChanges();
     }
 }
Exemple #2
0
 public void Update(Brand entity)
 {
     using (ReCapProjectERContext context = new ReCapProjectERContext())
     {
         var updatedEntity = context.Entry(entity);
         updatedEntity.State = EntityState.Modified;
         context.SaveChanges();
     }
 }
Exemple #3
0
 public void Add(Brand entity)
 {
     using (ReCapProjectERContext context = new ReCapProjectERContext())
     {
         var addedEntity = context.Entry(entity);
         addedEntity.State = EntityState.Added;
         context.SaveChanges();
     }
 }