public async Task <IActionResult> Create([Bind("ID,LocationID,ProductID,Quantity")] Inventory inventory) { if (ModelState.IsValid) { _context.Add(inventory); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(inventory)); }
public async Task <IActionResult> Create([Bind("ID,OrderID,ProductID,Quantity")] LineItem lineItem) { if (ModelState.IsValid) { _context.Add(lineItem); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(lineItem)); }
public async Task <IActionResult> Create([Bind("ID,CustomerID,LocationID,OrderDate,Price")] Order order) { if (ModelState.IsValid) { _context.Add(order); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(order)); }
public async Task <IActionResult> Create([Bind("ID,CustomerID,LocationID")] Cart cart) { if (ModelState.IsValid) { _context.Add(cart); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(cart)); }
public async Task <IActionResult> Create([Bind("ID,Username,Email")] Customer customer) { if (ModelState.IsValid) { _context.Add(customer); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(customer)); }
public async Task <IActionResult> Create([Bind("ID,Athlete,Item,Sport,Price")] Product product) { if (ModelState.IsValid) { _context.Add(product); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(product)); }