Ejemplo n.º 1
0
        public IActionResult OnPost(int rateId)
        {
            var rate = rateData.Delete(rateId);

            rateData.Commit();
            return(RedirectToPage("./RateList"));
        }
Ejemplo n.º 2
0
 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());
 }