public async Task <IActionResult> Create([Bind("InventoriesId,InventoryTitle,Quantity,LocationId")] Inventory inventory) { if (ModelState.IsValid) { _context.Add(inventory); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(inventory)); }
public async Task <IActionResult> Create([Bind("LocationId,Address,LocationName")] Location location) { if (ModelState.IsValid) { _context.Add(location); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(location)); }
public async Task <IActionResult> Create([Bind("ProductId,ProductName,Price,Brands,Sizes,Description,InventoriesId")] BeautyProduct beautyProduct) { if (ModelState.IsValid) { _context.Add(beautyProduct); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(beautyProduct)); }
public async Task <IActionResult> Create([Bind("CustomerName,Password,CustomerID,EmailAddress,PhoneNumber,HomeAddress,BillingAddress")] Customer customer) { if (ModelState.IsValid) { _context.Add(customer); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(customer)); }