コード例 #1
0
        public static KeyBuilder SharedNameExtension(this KeyBuilder builder, string value)
        {
            builder.HasAnnotation("Annotation", value + ".Annotation");
            builder.Metadata["Metadata"] = value + ".Metadata";
            builder.GetInfrastructure <IMutableModel>()["Model"] = value + ".Model";

            return(builder);
        }
コード例 #2
0
        public static KeyBuilder HasName([NotNull] this KeyBuilder keyBuilder, [CanBeNull] string name)
        {
            Check.NotNull(keyBuilder, nameof(keyBuilder));
            Check.NullButNotEmpty(name, nameof(name));

            keyBuilder.GetInfrastructure <InternalKeyBuilder>().Relational(ConfigurationSource.Explicit).HasName(name);

            return(keyBuilder);
        }