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); }
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); }