public async Task <IActionResult> Add(Product p) { if (ModelState.IsValid) { await _repo.AddProductAsync(p); return(RedirectToAction("Index")); } return(View(p)); }
public async Task <IActionResult> Add(Product p) { if (ModelState.IsValid) { await _repo.AddProductAsync(p); return(RedirectToAction("Index")); } return(View(p)); }