public async Task <IActionResult> CreateSale(int?id) { if (id == null) { return(this.NotFound()); } var offer = await this.offerService.GetOfferInfoAsync(id); if (offer == null) { return(this.NotFound()); } var sale = await saleService.CreateSaleByOfferIDAsync((int)id); return(this.RedirectToAction("Details", "Sales", new { id = sale.SaleID })); }