Beispiel #1
0
        public async Task <IActionResult> OnGet(Guid offerId)
        {
            Offer = await offerData.GetByIdAsync(offerId);

            if (Offer == null)
            {
                return(RedirectToPage("./NotFound"));
            }
            return(Page());
        }
Beispiel #2
0
        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());
        }