public async Task <IActionResult> DeleteProject(int id) { try { await _databaseDriver.DeleteProject(id); return(RedirectToAction("Projects")); } catch { return(View("../Shared/Error", new ErrorViewModel { Message = "Project cannot be deleted" })); } }