Пример #1
0
        public async Task <List <Audience> > GetAudienceByDateTimeAndNameAsync(DateTime audienceDate, string audienceBroadcaster)
        {
            var filter = Builders.Gte("AudienceDateTime", audienceDate) & Builders.Lte("AudienceDateTime", audienceDate.AddDays(1).AddMilliseconds(-1))
                         & Builders.Eq("IsDeleted", false) & Builders.Eq("AudienceBroadcaster", audienceBroadcaster);

            return(await Collection.Find(filter).ToListAsync());
        }