public async Task <ActionResult> Create(Models.Product product) { if (ModelState.IsValid) { product.Id = Guid.NewGuid(); await shopDbService.CreateAsync(product); return(RedirectToAction(nameof(Index))); } return(View()); }
public async Task <ActionResult> Create(Models.Customer customer) { if (ModelState.IsValid) { customer.Id = Guid.NewGuid(); await shopDbService.CreateAsync(customer); return(RedirectToAction(nameof(Index))); } return(View()); }