public int Update(ProductSubCategory item)
 {
     item.CategoryName         = context.ProductCategory.Where(x => x.ProductCategoryID == item.ProductCategoryID).Select(y => y.Name).FirstOrDefault();
     item.ModifiedDate         = DateTime.Now;
     context.Entry(item).State = EntityState.Modified;
     return(context.SaveChanges());
 }
Esempio n. 2
0
 public int Update(ProductModel item)
 {
     item.ModifiedDate         = DateTime.Now;
     context.Entry(item).State = EntityState.Modified;
     return(context.SaveChanges());
 }
Esempio n. 3
0
 int IRepositoryBase <Product> .Update(Product item)
 {
     context.Entry(item).State = EntityState.Modified;
     return(context.SaveChanges());
 }