public async Task <GetResponse <IReadOnlyList <IPolicy> > > GetAllAsync()
        {
            var getResponse = new GetResponse <IReadOnlyList <IPolicy> >();

            try
            {
                getResponse = await _policyRepository.GetAllAsync();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                getResponse.AddError(ex);
                _logManager.LogError(ex, "Error retrieving policys");
            }

            return(getResponse);
        }
Example #2
0
 public async ValueTask <IEnumerable <Policy> > GetAllPoliciesAsync()
 {
     return(await _policyRepository.GetAllAsync().ConfigureAwait(false));
 }