Example #1
0
 public IActionResult OnPost()
 {
     Genders = htmlHelper.GetEnumSelectList <GenderType>();
     if (ModelState.IsValid)
     {
         if (PeopleEntity.Id > 0)
         {
             peopleData.UpdatePeople(PeopleEntity);
         }
         else
         {
             peopleData.AddPeople(PeopleEntity);
         }
         peopleData.Commit();
         return(RedirectToPage("./List"));
     }
     return(Page());
 }