示例#1
0
 public async Task<List<Vm>> SearchAsync(Rm request)
 {
     IQueryable<Payment> queryable = request.GetOrderedData(Repository.Get()).Include(y => y.Supplier);
     queryable = request.SkipAndTake(queryable);
     var list = await queryable.ToListAsync();
     return list.ConvertAll(x => new Vm(x));
 }
示例#2
0
        public async Task <IHttpActionResult> Get(string keyword, string orderBy, string isAsc)
        {
            var request  = new Rm(keyword, orderBy, isAsc);
            var products = await service.SearchAsync(request);

            return(Ok(products));
        }
示例#3
0
 public async Task<int> CountAsync(Rm request)
 {
     var queryable = request.GetOrderedData(Repository.Get());
     var count = await queryable.CountAsync();
     return count;
 }
示例#4
0
 public async Task <IHttpActionResult> Count(Rm request)
 {
     return(Ok(await service.CountAsync(request)));
 }
示例#5
0
 public async Task <IHttpActionResult> Data(Rm request)
 {
     return(Ok(await service.SearchAsync(request)));
 }