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

            if (Offer == null)
            {
                return(RedirectToPage("./NotFound"));
            }
            return(Page());
        }
コード例 #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());
        }