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()); }
public int Update(ProductModel item) { item.ModifiedDate = DateTime.Now; context.Entry(item).State = EntityState.Modified; return(context.SaveChanges()); }
int IRepositoryBase <Product> .Update(Product item) { context.Entry(item).State = EntityState.Modified; return(context.SaveChanges()); }