// Keep this constructor protected to avoid creation from outside
        protected QueryableDataModelCollection(PnPContext context, IDataModelParent parent, string memberName = null)
        {
            var queryService = new DataModelQueryService <TModel>(context, parent, memberName);

            provider   = new DataModelQueryProvider <TModel>(queryService);
            Expression = Expression.Constant(this);
        }
 /// <summary>
 /// Returns OData query string for the current expression
 /// </summary>
 public override string ToString()
 {
     return(DataModelQueryProvider <TModel> .Translate(Expression).ToString());
 }
 // Public constructor that accepts a LINQ Query Provider object instance
 // it uses the provided expression as the LINQ Expression
 public QueryableDataModelCollection(DataModelQueryProvider <TModel> provider, Expression expression)
 {
     this.provider = provider ?? throw new ArgumentNullException(nameof(provider));
     Expression    = expression;
 }
 // Public constructor that accepts a LINQ Query Provider object instance
 // it uses the current object as a constant LINQ Expression
 public QueryableDataModelCollection(DataModelQueryProvider <TModel> provider)
 {
     this.provider = provider ?? throw new ArgumentNullException(nameof(provider));
     Expression    = Expression.Constant(this);
 }