public async Task <IActionResult> Create([Bind("CustomerID,CustomerName,ContactNumber,Expenses")] Clients clients) { if (ModelState.IsValid) { _context.Add(clients); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(clients)); }
public async Task <IActionResult> Create([Bind("ProductID,ProductName,Company,Charges")] Product product) { if (ModelState.IsValid) { _context.Add(product); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(product)); }
public async Task <IActionResult> Create([Bind("SaloonID,SaloonName,SaloonAddress,Contact_Number")] Saloon saloon) { if (ModelState.IsValid) { _context.Add(saloon); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(saloon)); }