public async Task <IActionResult> Edit(int id, [Bind("ID,Name,Gender,Email,PhoneNo,Address")] Customer_Mst customer_Mst) { if (id != customer_Mst.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(customer_Mst); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Customer_MstExists(customer_Mst.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(customer_Mst)); }
public async Task <IActionResult> Create([Bind("ID,Name,Gender,Email,PhoneNo,Address")] Customer_Mst customer_Mst) { if (ModelState.IsValid) { _context.Add(customer_Mst); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(customer_Mst)); }