public SelectExpression(IEntityType entityType, IQuerySource querySource)
 {
     Projection       = new EntityProjectionExpression(entityType, _rootAlias);
     FromExpression   = new RootReferenceExpression(entityType, _rootAlias);
     EntityType       = entityType;
     FilterExpression = GetDiscriminatorPredicate(entityType);
     _querySource     = querySource;
 }
        public SelectExpression(IEntityType entityType, IQuerySource querySource)
        {
            Projection = new EntityProjectionExpression(entityType, _rootAlias);

            FromExpression = new RootReferenceExpression(entityType, _rootAlias);

            // Add discriminator predicate
            var discriminatorProperty = entityType.CosmosSql().DiscriminatorProperty;

            FilterExpression = MakeBinary(
                ExpressionType.Equal,
                new KeyAccessExpression(discriminatorProperty, FromExpression),
                Constant(entityType.CosmosSql().DiscriminatorValue, discriminatorProperty.ClrType));

            EntityType   = entityType;
            _querySource = querySource;
        }