Пример #1
0
        public async Task <int> CountAsync(Rm request)
        {
            var queryable = request.GetOrderedData(Repository.Get());
            var count     = await queryable.CountAsync();

            return(count);
        }
Пример #2
0
        public async Task <List <Vm> > SearchAsync(Rm request)
        {
            var queryable = request.GetOrderedData(Repository.Get());

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

            return(list.ConvertAll(x => new Vm(x)));
        }
Пример #3
0
        public Vm GetDetail(string id)
        {
            var model = Repository.GetById(id);

            if (model == null)
            {
                return(null);
            }
            return(new Vm(model));
        }
Пример #4
0
 public FeeService(Repository repository) : base(repository)
 {
     this.repository = repository;
 }