public async Task OnGetAsync() { var offer = await _offerService.GetEntityByIdAsync <Offer>(Id); Offer = new OfferViewModel { Name = offer.Name, Description = offer.Description, Price = offer.Price, }; }
public async Task <ActionResult> OnGetAsync() { var offer = await _offerService.GetEntityByIdAsync <Offer>(Id); await _offerService.DeleteAsync(offer); return(Redirect("/")); }