Custom Entity Framework Code First Convention for Discriminator Values

added by Ricardo Peres
1/26/2015 4:14:08 PM

1 Kicks, 71 Views

Since version 6, Entity Framework Code First allows the injection of custom conventions. These conventions define rules that will be applied by default to all mapped entities and properties, unless explicitly changed. The conventions API includes a couple of interfaces: IConvention (marker only, should always be included), IConceptualModelConvention (for the conceptual space of the model) and IStoreModelConvention (for the store, or physical, side of the model).