public void Update(FeatureDetail featureDetail)
 {
     using (TechContext context = new TechContext())
     {
         var entity = context.Entry(featureDetail);
         entity.State = EntityState.Modified;
         context.SaveChanges();
     }
 }
Esempio n. 2
0
 public void ProductUpdate(Product product)
 {
     using (TechContext context = new TechContext())
     {
         var entity = context.Entry(product);
         entity.State = EntityState.Modified;
         context.SaveChanges();
     }
 }
Esempio n. 3
0
 public void Update(Brand brand)
 {
     using (TechContext context = new TechContext())
     {
         var entity = context.Entry(brand);
         entity.State = EntityState.Modified;
         context.SaveChanges();
     }
 }
Esempio n. 4
0
 public void Delete(Admin admin)
 {
     using (TechContext context = new TechContext())
     {
         var entity = context.Entry(admin);
         entity.State = EntityState.Deleted;
         context.SaveChanges();
     }
 }
 public void Add(Message message)
 {
     using (TechContext context = new TechContext())
     {
         var entity = context.Entry(message);
         entity.State = EntityState.Added;
         context.SaveChanges();
     }
 }
Esempio n. 6
0
 public void Add(Category category)
 {
     using (TechContext context = new TechContext())
     {
         var entity = context.Entry(category);
         entity.State = EntityState.Added;
         context.SaveChanges();
     }
 }
 public void UserUpdate(User user)
 {
     using (TechContext context = new TechContext())
     {
         var entity = context.Entry(user);
         entity.State = EntityState.Modified;
         context.SaveChanges();
     }
 }