public CachingHatService( IHatService dataLayer , IDistributedCache cache , IMapper mapper , ILogger <CachingHatService> logger) { _dataLayer = dataLayer; _cache = cache; _mapper = mapper; _logger = logger; }
public async Task <IEnumerable <HatResource> > Get([FromServices] IHatService service) { _logger.LogInformation("Getting all hats"); return(await service.GetHatsAsync()); }
public HatController(IHatService Hat) { _Hat = Hat; }
public async Task <HatResource> Get(Guid hatId, [FromServices] IHatService service) { _logger.LogInformation("Getting hat", new { hatId }); return(await service.GetHatAsync(hatId)); }