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