private IEnumerable <T> GetStatEntities <T>(IStatisticsRepository <T> statEntityRepository, Interval interval) where T : StatEntity, IEntity { string startTick = _tableValueConverter.DateTimeToComparerTick(interval.Start); string finishTick = _tableValueConverter.DateTimeToComparerTick(interval.Finish); var queryObject = new StatQueryObject { StartInterval = startTick, EndInterval = finishTick, IsStartInclude = false, IsEndInclude = false }; IEnumerable <T> result = statEntityRepository.GetStatEntities(queryObject); return(result); }