コード例 #1
0
        public async Task <Report> GetStatsAsync()
        {
            Expression <Func <ReportDocument, bool> > filter = document => (true);
            var humanReportDocument = await _dbContext.FindOneAsync(filter);

            return(humanReportDocument.Adapt <Report>());
        }
コード例 #2
0
 public async Task <T> GetOneAsync <T>(Expression <Func <T, bool> > expression, IMongoDBStateContext stateContext = null) where T : class
 {
     return(await context.FindOneAsync <T>(expression, stateContext));
 }