Ejemplo n.º 1
0
 public void editSpecificationLaptop(SpecificationLaptop entity)
 {
     try
     {
         var laptop  = db.Specifications.Where(x => x.catalogid == entity.id).FirstOrDefault();
         var slaptop = db.SpecificationsLaptops.Where(x => x.catalogid == entity.id).FirstOrDefault();
         SpecificationsMapper.laptopMapper(laptop, slaptop, entity);
         db.SaveChanges();
     }
     catch (Exception)
     {
         throw new Exception("Cập nhật thông số kĩ thuật laptop lỗi");
     }
 }
Ejemplo n.º 2
0
 public void editSpecificationMobile(SpecificationMobile entity)
 {
     try
     {
         var mobile  = db.Specifications.Where(x => x.catalogid == entity.id).FirstOrDefault();
         var smobile = db.SpecificationsMobiles.Where(x => x.catalogid == entity.id).FirstOrDefault();
         SpecificationsMapper.mobileMapper(mobile, smobile, entity);
         db.SaveChanges();
     }
     catch (Exception)
     {
         throw new Exception("Cập nhật thông số kĩ thuật điện thoại lỗi");
     }
 }