public async Task <IActionResult> Create([Bind("IdUser,Username,Password,Name,Lastname,Dob,IdStatus,Image")] User user) { if (ModelState.IsValid) { _context.Add(user); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(user)); }
public async Task <IActionResult> Create([Bind("IdPay,IdProduct,IdCus,PaymentDate,Totalprice")] Payment payment) { if (ModelState.IsValid) { _context.Add(payment); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(payment)); }
public async Task <IActionResult> Create([Bind("IdProduct,ProductName,Image,Price,Unit")] Product product) { if (ModelState.IsValid) { _context.Add(product); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(product)); }
public async Task <IActionResult> Create([Bind("IdCus,NameCus,LastnameCus,AddressCus,TelCus")] Customers customers) { if (ModelState.IsValid) { _context.Add(customers); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(customers)); }