예제 #1
0
        public StatsDTO CreateUrl(UrlInputDTO urlInputDTO, int userid)
        {
            User user = this.GetByID(userid);

            if (user == null)
            {
                return(null);
            }

            Url url = _urlService.Create(urlInputDTO.Url, user);

            return(_statsService.Get(url));
        }
예제 #2
0
 public async Task <Stat> Get(int id)
 => await _memoryCache.GetOrCreateAsync(
     $"{_typeName}-Get-{id}",
     entry => _statsService.Get(id));