Exemplo n.º 1
0
        public Index(
            [NotNull] IReadOnlyList<Property> properties,
            [NotNull] EntityType declaringEntityType,
            ConfigurationSource configurationSource)
        {
            Check.NotEmpty(properties, nameof(properties));
            Check.HasNoNulls(properties, nameof(properties));
            Check.NotNull(declaringEntityType, nameof(declaringEntityType));

            Properties = properties;
            DeclaringEntityType = declaringEntityType;
            _configurationSource = configurationSource;

            Builder = new InternalIndexBuilder(this, declaringEntityType.Model.Builder);
        }
Exemplo n.º 2
0
 public OnIndexUniquenessChangedNode(InternalIndexBuilder indexBuilder)
 {
     IndexBuilder = indexBuilder;
 }
Exemplo n.º 3
0
 public OnIndexAddedNode(InternalIndexBuilder indexBuilder)
 {
     IndexBuilder = indexBuilder;
 }
Exemplo n.º 4
0
 public virtual bool OnIndexUniquenessChanged([NotNull] InternalIndexBuilder indexBuilder)
 {
     Add(new OnIndexUniquenessChangedNode(indexBuilder));
     return(true);
 }
Exemplo n.º 5
0
 public virtual InternalIndexBuilder OnIndexAdded([NotNull] InternalIndexBuilder indexBuilder)
 {
     Add(new OnIndexAddedNode(indexBuilder));
     return(indexBuilder);
 }
Exemplo n.º 6
0
        public IndexBuilder([NotNull] IMutableIndex index)
        {
            Check.NotNull(index, nameof(index));

            _builder = ((Index)index).Builder;
        }
Exemplo n.º 7
0
        /// <summary>
        ///     <para>
        ///         Initializes a new instance of the <see cref="IndexBuilder" /> class to configure a given index.
        ///     </para>
        ///     <para>
        ///         Instances of this class are returned from methods when using the <see cref="ModelBuilder" /> API
        ///         and it is not designed to be directly constructed in your application code.
        ///     </para>
        /// </summary>
        /// <param name="builder"> Internal builder for the index being configured. </param>
        public IndexBuilder([NotNull] InternalIndexBuilder builder)
        {
            Check.NotNull(builder, nameof(builder));

            _builder = builder;
        }
Exemplo n.º 8
0
                public IndexBuilder([NotNull] InternalIndexBuilder builder)
                {
                    Check.NotNull(builder, "builder");

                    _builder = builder;
                }
 public OracleIndexBuilderAnnotations(
     [NotNull] InternalIndexBuilder internalBuilder,
     ConfigurationSource configurationSource)
     : base(new RelationalAnnotationsBuilder(internalBuilder, configurationSource))
 {
 }
 /// <summary>
 ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
 ///     directly from your code. This API may change or be removed in future releases.
 /// </summary>
 public virtual bool OnIndexUniquenessChanged([NotNull] InternalIndexBuilder indexBuilder)
 => _scope.OnIndexUniquenessChanged(Check.NotNull(indexBuilder, nameof(indexBuilder)));
 /// <summary>
 ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
 ///     directly from your code. This API may change or be removed in future releases.
 /// </summary>
 public virtual InternalIndexBuilder OnIndexAdded([NotNull] InternalIndexBuilder indexBuilder)
 => _scope.OnIndexAdded(Check.NotNull(indexBuilder, nameof(indexBuilder)));
 /// <summary>
 ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
 ///     directly from your code. This API may change or be removed in future releases.
 /// </summary>
 public static MySqlIndexBuilderAnnotations MySql(
     [NotNull] this InternalIndexBuilder builder,
     ConfigurationSource configurationSource)
 => new MySqlIndexBuilderAnnotations(builder, configurationSource);
 /// <summary>
 ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
 ///     directly from your code. This API may change or be removed in future releases.
 /// </summary>
 public static JetIndexBuilderAnnotations Jet(
     [NotNull] this InternalIndexBuilder builder,
     ConfigurationSource configurationSource)
 => new JetIndexBuilderAnnotations(builder, configurationSource);
Exemplo n.º 14
0
 /// <summary>
 ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
 ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
 ///     any release. You should only use it directly in your code with extreme caution and knowing that
 ///     doing so can result in application failures when updating to a new Entity Framework Core release.
 /// </summary>
 public static SqlServerIndexBuilderAnnotations SqlServer(
     [NotNull] this InternalIndexBuilder builder,
     ConfigurationSource configurationSource)
 => new SqlServerIndexBuilderAnnotations(builder, configurationSource);
Exemplo n.º 15
0
 /// <summary>
 ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
 ///     directly from your code. This API may change or be removed in future releases.
 /// </summary>
 public static RelationalIndexBuilderAnnotations Sqlite(
     [NotNull] this InternalIndexBuilder builder,
     ConfigurationSource configurationSource)
 => new RelationalIndexBuilderAnnotations(builder, configurationSource);
Exemplo n.º 16
0
 /// <summary>
 /// Oracle
 /// </summary>
 /// <param name="builder">内部模型创建器</param>
 /// <param name="configurationSource">配置源</param>
 /// <returns></returns>
 public static OracleIndexBuilderAnnotations Oracle(
     [NotNull] this InternalIndexBuilder builder,
     ConfigurationSource configurationSource)
 {
     return(new OracleIndexBuilderAnnotations(builder, configurationSource));
 }
Exemplo n.º 17
0
 public IndexBuilder([NotNull] InternalIndexBuilder builder)
     : base(builder)
 {
 }
 InternalIndexBuilder IIndexAddedConvention.Apply(InternalIndexBuilder indexBuilder)
 => SetIndexFilter(indexBuilder);
 bool IIndexUniquenessChangedConvention.Apply(InternalIndexBuilder indexBuilder)
 {
     SetIndexFilter(indexBuilder);
     return(true);
 }
 public static RelationalIndexBuilderAnnotations Firebird(this InternalIndexBuilder builder, ConfigurationSource configurationSource)
 => new RelationalIndexBuilderAnnotations(builder, configurationSource);