コード例 #1
0
 public IEnumerable <Domain.Entities.Type> All()
 {
     try
     {
         List <Domain.Entities.Type> p = _TypesService.Get();
         return(p);
     }
     catch (Exception ex)
     {
         _logger.LogError(ex.Message);
         throw ex;
     }
 }
コード例 #2
0
 public async Task <Type> Get(int id)
 => await _memoryCache.GetOrCreateAsync(
     $"{_typeName}-Get-{id}",
     entry => _typesService.Get(id));