public async Task <IActionResult> Create([Bind("ProductId,Name,Description,Weight,Barcode,Price")] Product product) { if (ModelState.IsValid) { _context.Add(product); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(product)); }
public async Task <IActionResult> CreateConfirmation([Bind("ClientId,Name,Address,Bulstat,RegisteredVat,Mol")] Client client) { if (ModelState.IsValid) { _context.Add(client); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View()); }
public async Task <IActionResult> Create([Bind("SaleId,SaleDate,Invoice")] Sale sale) { if (ModelState.IsValid) { _context.Add(sale); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(sale)); }