Пример #1
0
        public async Task <IEnumerable <DataStructure.News> > GetTopNewsAsync(int topCount, bool isSelected)
        {
            var newsCommandBuilder = new NewsCommandBuilder();
            var query = newsCommandBuilder.GetTopNews(topCount, isSelected);

            return(await DBManager.GetCollectionAsync <DataStructure.News>(base.ConnectionHandler, query));
        }
Пример #2
0
        public IEnumerable <DataStructure.News> Search(string text)
        {
            var newsCommandBuilder = new NewsCommandBuilder();
            var query = newsCommandBuilder.Search(text);

            return(DBManager.GetCollection <DataStructure.News>(base.ConnectionHandler, query));
        }
Пример #3
0
        public IEnumerable <DataStructure.News> GetByCategory(Guid categoryId, int?topCount)
        {
            var newsCommandBuilder = new NewsCommandBuilder();
            var query = newsCommandBuilder.GetByCategory(categoryId, topCount);

            return(DBManager.GetCollection <DataStructure.News>(base.ConnectionHandler, query));
        }