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)); }
public async Task <Stat> Get(int id) => await _memoryCache.GetOrCreateAsync( $"{_typeName}-Get-{id}", entry => _statsService.Get(id));