public async Task <IActionResult> Create(Repair repair) { if (ModelState.IsValid) { var client = _clientRepository.GetClientByUserEmail(User.Identity.Name); await _repairRepository.CreateAsync(repair); if (User.IsInRole("Mechanic")) { return(RedirectToAction("MyRepairs", "Mechanics")); } return(RedirectToAction(nameof(Index))); } return(View(repair)); }