Ejemplo n.º 1
0
        public async Task <int> CountAsync(Rm request)
        {
            var queryable = request.GetOrderedData(Repository.Get());
            var count     = await queryable.CountAsync();

            return(count);
        }
Ejemplo n.º 2
0
        public async Task <List <Vm> > SearchAsync(Rm request)
        {
            IQueryable <Supplier> queryable = request.GetOrderedData(Repository.Get());

            queryable = request.SkipAndTake(queryable);
            var list = await queryable.ToListAsync();

            return(list.ConvertAll(x => new Vm(x)));
        }
 public async Task <IHttpActionResult> Count(Rm request)
 {
     return(Ok(await service.CountAsync(request)));
 }
 public async Task <IHttpActionResult> Data(Rm request)
 {
     return(Ok(await service.SearchAsync(request)));
 }
 public async Task <IHttpActionResult> Post(Rm request)
 {
     return(Ok(await service.GetHistoryAsync(request.Id)));
 }