public async Task <IActionResult> Create(Supplier supplier) { if (ModelState.IsValid) { await _invoicesRepository.AddSupplierAsync(supplier); return(RedirectToAction(nameof(Index))); } return(View(supplier)); }