public ActionResult CategoryMatches(CategoryMatchesViewModel model) { Service.CategoryMatches.Upsert(new CategoryMatch() { Match = model.Match, CategoryId = model.CategoryId }); model.CurrentCategoryMatches = Service.CategoryMatches.GetList(new { categoryid = model.CategoryId }); return PartialView("CategoryMatchListPartial", new CategoryMatchesListViewModel(model.CurrentCategoryMatches)); }
public ActionResult CategoryMatches(Guid id) { var model = new CategoryMatchesViewModel(); model.CurrentCategoryMatches = Service.CategoryMatches.GetList(new { categoryid = id }); model.CategoryName = Service.Categories.GetById(id).Name; model.CategoryId = id; return View(model); }