public static NewCategory Update(NewCategory item) { using (var uow = new UnitOfWork()) { return uow.NewCategoryRepository.Update(item); } }
public ActionResult Create(string categoryName, string metaTitle, string description, string categoryImage, DateTime categoryCreateDate) { var category = new NewCategory() { Name = categoryName, MetaTittle = metaTitle, Description = description, Image = categoryImage, CreatedDate = categoryCreateDate, Status = true }; var create = NewCategoryService.Add(category); if (create != null) return RedirectToAction("Index", "NewCategory"); return View(); }