Enums have implicit numeric indicies.
public enum BallType{
Baseball = 0,
Basketball = 1,
Football = 2
}
You can change the “seed”:
Implies 1, 2, 3
public enum BallType{
Baseball = 1,
Basketball,
Football
}
The Entity Framework Designer maps enums to int data types.
In Entity Data Model Diagram(edmx)
– Right-click column
– Select convert to enum
– In the Add Enum Type dialog, either:
— Select reference external type, enter namespace + type, or…
— Enter Enum type name, enter Members and optional values