Esempio n. 1
0
        public async Task <UserPhoto> GetByIdAsync(int id)
        {
            var token = _cacheManager.GetOrCreateToken(this.GetType(), "ById", id);

            return(await _cacheManager.GetOrCreateAsync(token,
                                                        async (cacheEntry) => await _userPhotoRepository.SelectByIdAsync(id)));
        }