public async Task <IActionResult> GetAsync(int id) { var result = await _consultantService.GetByIdAsync(id); if (!result.Success) { return(BadRequest(result.Message)); } var consultantResource = _mapper.Map <Consultant, ConsultantResource>(result.Resource); return(Ok(consultantResource)); }