public async Task <IActionResult> Edit(int id, [Bind("Sid,Sname,Password,PostalAddress,Email,Website,Companyname,Bankdetails")] Seller seller) { if (id != seller.Sid) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(seller); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SellerExists(seller.Sid)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(seller)); }
public async Task <IActionResult> Edit(int id, [Bind("SId,Username,Password,Companyname,GSTIN,AboutCompany,Address,Website,Email,Mobileno")] Seller seller) { if (id != seller.SId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(seller); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SellerExists(seller.SId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(SellerIndex))); } return(View(seller)); }