public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } if (await _roomTypeService.DeleteRoomTypeAsync(id ?? 0)) { Message = "Success"; } return(RedirectToPage("./Index")); }