// Update workshop : Get public ActionResult Update(int id = 0, int p = 1, int ps = 50) { if (id <= 0) { return(RedirectToAction(nameof(Index))); } var model = _workshopService.GetForEdit(id); model.Id = id; LoadListsForEdit(model); // Save Paging info StorePaging(p, ps); model.PageNum = PageNumber; model.PageSize = PageSize; // Pass the action to the form so it knows to return to Update ViewData["Action"] = "Update"; return(View(model)); }