示例#1
0
        public async Task <IEnumerable <Assets> > SearchAssets(Expression <Func <Assets, bool> > whereExpressions)
        {
            var query = whereExpressions == null?AssetsDb.AsQueryable() : AssetsDb.AsQueryable().Where(whereExpressions);

            return(await query.ToListAsync());
        }
示例#2
0
 public async Task <Assets> GetById(Guid assetId)
 {
     return(await AssetsDb.AsQueryable().FirstAsync(asset => asset.AssetsId == assetId));
 }