Beispiel #1
0
        public async void Test1()
        {
            //_db.Include<Download>();
            //_db.Include<Module, Course>();

            var result1 = await _dbReadService.SingleAsync <Download>(d => d.Id.Equals(3));

            var result2 = await _dbReadService.GetAsync <Download>(include : true); // Fetch all

            // Fetch all that matches the Lambda expression
            var result3 = await _dbReadService.GetAsync <Download>(d => d.ModuleId.Equals(1));

            var result4 = await _dbReadService.AnyAsync <Download>(d => d.ModuleId.Equals(1)); // True if a record is found
        }
Beispiel #2
0
 public async Task <bool> AnyAsync <TEntity>(Expression <Func <TEntity, bool> > expression) where TEntity : class
 {
     return(await _dbRead.AnyAsync(expression));
 }