public async Task <IActionResult> OnPostAsync(int?id) { if (!ModelState.IsValid) { return(Page()); } _context.Attach(Quotation).State = EntityState.Modified; await _context.SaveChangesAsync(); if (id == null) { return(RedirectToPage("./Index", new { Area = "Quotations" })); } else { return(RedirectToPage("./Edit", new { Area = "Quotations", id = id })); } }