Esempio n. 1
0
        protected override async Task <Try <Page <Try <Installment> > > > GetResult(GetAllParam param)
        {
            var parameters = new
            {
                email = param.Email.Value,
                skip  = this.skip.Apply(param.Filter),
                limit = this.limit.Apply(param.Filter),
            };

            var data = await this.connection.ExecuteCypher(
                record => MapInstallment(record),
                StatementOption.GetOrElse(Empty),
                parameters);

            return(data.Select(items => new Page <Try <Installment> >(items, parameters.skip, parameters.limit)));
        }
Esempio n. 2
0
        protected override async Task <Try <Page <Try <Budget> > > > GetResult(GetAllParam param)
        {
            var parameters = new
            {
                email = param.Email.Value,
                skip  = this.skip.Apply(param.Filter),
                limit = this.limit.Apply(param.Filter),
            };

            var data = await this.connection.ExecuteCypher(
                MapBudget(param.Filter),
                Statement
                .GetOrElse(Empty)
                .Replace("#where#", this.where.Apply(param.Filter))
                .Replace("#where_transaction#", this.whereTransaction.Apply(param.Filter)),
                parameters);

            return(data.Select(items => new Page <Try <Budget> >(items, parameters.skip, parameters.limit)));
        }