Current
public static ModelBuilder ForNpgsqlHasEnum(
[NotNull] this ModelBuilder modelBuilder,
[CanBeNull] string schema,
[NotNull] string name,
[NotNull] string[] labels);
public static ModelBuilder ForNpgsqlHasEnum(
[NotNull] this ModelBuilder modelBuilder,
[NotNull] string name,
[NotNull] string[] labels);
Proposed additions
public static ModelBuilder ForNpgsqlHasEnum<TEnum>(
[NotNull] this ModelBuilder modelBuilder,
[CanBeNull] string schema = null,
[CanBeNull] string name = null,
[CanBeNull] INpgsqlNameTranslator nameTranslator = null)
where TEnum : struct, Enum;
nameTranslator is used when name is null
nameTranslator is used when labels is null.
- Should default (internally) to match the default in
MapEnum<T>.
edit: Removing labels proposal. Too much complexity, not enough upside.
Current
Proposed additions
nameTranslatoris used whennameisnullnameTranslatoris used whenlabelsisnull.MapEnum<T>.edit: Removing labels proposal. Too much complexity, not enough upside.