/// <summary>
        ///     This constructor is called by Provider.CreateQuery().
        /// </summary>
        /// <param name="expression"></param>
        public QueryableVismaNetCustomerInvoiceData(VismaNetQueryProvider provider, Expression expression)
        {
            if (provider == null)
            {
                throw new ArgumentNullException("provider");
            }

            if (expression == null)
            {
                throw new ArgumentNullException("expression");
            }

            if (!typeof(IQueryable <TData>).IsAssignableFrom(expression.Type))
            {
                throw new ArgumentOutOfRangeException("expression");
            }

            Provider   = provider;
            Expression = expression;
        }
 /// <summary>
 ///     This constructor is called by the client to create the data source.
 /// </summary>
 public QueryableVismaNetCustomerInvoiceData(VismaNetAuthorization auth) : base(auth)
 {
     Provider   = new VismaNetQueryProvider(Authorization);
     Expression = Expression.Constant(this);
 }