Ejemplo n.º 1
0
        public IEnumerable <Order> FindAllCustomerOrdersWithinDateBy(Guid customerId, DateTime dateTime)
        {
            Infrastructure.Query query = new Infrastructure.Query();
            query.Add(new Infrastructure.Criterion("CustomerId", customerId, Infrastructure.CriteriaOperator.Equal));
            query.QueryOperator = Infrastructure.QueryOperator.And;
            query.Add(new Infrastructure.Criterion("OrderDate", dateTime, Infrastructure.CriteriaOperator.LessThanOrEqual));
            query.OrderByClause = new Infrastructure.OrderByClause()
            {
                PropertyName = "OrderDate", Desc = true
            };
            var res = this._repo.FindBy(query);

            return(res);
        }
Ejemplo n.º 2
0
        public IEnumerable <Order> FindAllCustomerOrdersBy(Guid customerId)
        {
            Infrastructure.Query query = new Infrastructure.Query();
            query.Add(new Infrastructure.Criterion("CustomerId", customerId, Infrastructure.CriteriaOperator.Equal));
            query.OrderByClause = new Infrastructure.OrderByClause()
            {
                PropertyName = "CustomerId", Desc = true
            };
            var res = this._repo.FindBy(query);

            return(res);
        }