public IActionResult OnPost(int rateId) { var rate = rateData.Delete(rateId); rateData.Commit(); return(RedirectToPage("./RateList")); }
public IActionResult OnPost() { if (ModelState.IsValid) { if (Rate.Id > 0) { Rate = rateData.Update(Rate); } else { Rate = rateData.Add(Rate); } rateData.Commit(); return(RedirectToPage("./RateList")); } return(Page()); }