public async Task <IActionResult> OnGet(Guid offerId) { Offer = await offerData.GetByIdAsync(offerId); if (Offer == null) { return(RedirectToPage("./NotFound")); } return(Page()); }
public async Task <IActionResult> OnGet(Guid?offerId) { if (offerId.HasValue) { Offer = await offerData.GetByIdAsync(offerId.Value); } else { Offer = new Offer(); } if (Offer == null) { return(RedirectToPage("./NotFound")); } return(Page()); }