public async Task<ServiceResponse> GetAllByUser(int idUser) { var sr = new ServiceResponse(); try { sr.Data = _mapper.Map<IEnumerable<ProviderDto>>(await _repositoryProvider.GetAllByUser(idUser)); } catch (Exception ex) { sr.AddError(ex); } return sr; }