public async Task <IActionResult> Delete(int Id) { FactoryService fs = new FactoryService(_con); bool x = await fs.DeleteFactoryAsync(Id); return(RedirectToAction(nameof(Index))); }