public async Task <IActionResult> DeleteSpecialist(int id) { var specialist = await repository.GetSpecialistToDelete(id); if (specialist == null) { return(NotFound()); } repository.Remove(specialist); await unitOfWork.CompleteAsync(); return(Ok(id)); }