コード例 #1
0
        public async Task OnGetAsync()
        {
            var offer = await _offerService.GetEntityByIdAsync <Offer>(Id);

            Offer = new OfferViewModel
            {
                Name        = offer.Name,
                Description = offer.Description,
                Price       = offer.Price,
            };
        }
コード例 #2
0
        public async Task <ActionResult> OnGetAsync()
        {
            var offer = await _offerService.GetEntityByIdAsync <Offer>(Id);

            await _offerService.DeleteAsync(offer);

            return(Redirect("/"));
        }