Beispiel #1
0
        public static ModelBuilderTest.TestIndexBuilder HasFilter(
            this ModelBuilderTest.TestIndexBuilder builder, string filterExpression)
        {
            var indexBuilder = builder.GetInfrastructure();

            indexBuilder.HasFilter(filterExpression);
            return(builder);
        }
Beispiel #2
0
        public static ModelBuilderTest.TestIndexBuilder HasName(
            this ModelBuilderTest.TestIndexBuilder builder, string name)
        {
            var indexBuilder = builder.GetInfrastructure();

            indexBuilder.HasName(name);
            return(builder);
        }
Beispiel #3
0
        public static ModelBuilderTest.TestIndexBuilder IsClustered(
            this ModelBuilderTest.TestIndexBuilder builder, bool clustered = true)
        {
            var indexBuilder = builder.GetInfrastructure();

            indexBuilder.IsClustered(clustered);
            return(builder);
        }
        public static ModelBuilderTest.TestIndexBuilder <TEntity> HasName <TEntity>(
            this ModelBuilderTest.TestIndexBuilder <TEntity> builder, string name)
        {
            switch (builder)
            {
            case IInfrastructure <KeyBuilder <TEntity> > genericBuilder:
                genericBuilder.Instance.HasName(name);
                break;

            case IInfrastructure <KeyBuilder> nongenericBuilder:
                nongenericBuilder.Instance.HasName(name);
                break;
            }

            return(builder);
        }
        public static ModelBuilderTest.TestIndexBuilder <TEntity> HasFilter <TEntity>(
            this ModelBuilderTest.TestIndexBuilder <TEntity> builder, string filterExpression)
        {
            switch (builder)
            {
            case IInfrastructure <IndexBuilder <TEntity> > genericBuilder:
                genericBuilder.Instance.HasFilter(filterExpression);
                break;

            case IInfrastructure <IndexBuilder> nongenericBuilder:
                nongenericBuilder.Instance.HasFilter(filterExpression);
                break;
            }

            return(builder);
        }
Beispiel #6
0
        public static ModelBuilderTest.TestIndexBuilder <TEntity> IsClustered <TEntity>(
            this ModelBuilderTest.TestIndexBuilder <TEntity> builder, bool clustered = true)
        {
            switch (builder)
            {
            case IInfrastructure <IndexBuilder <TEntity> > genericBuilder:
                genericBuilder.Instance.IsClustered(clustered);
                break;

            case IInfrastructure <IndexBuilder> nongenericBuilder:
                nongenericBuilder.Instance.IsClustered(clustered);
                break;
            }

            return(builder);
        }