Пример #1
0
 public async Task <IActionResult> OnPostAsync()
 {
     if (ModelState.IsValid)
     {
         if (await _roomTypeService.AddRoomTypeAsync(RoomType))
         {
             Message = "Success";
         }
         return(Redirect("./Index"));
     }
     // Modelstate wasn't valid
     return(Page());
 }