Enum types Support-opracowanie

Nasza ocena:

3
Wyświetleń: 350
Komentarze: 0
Notatek.pl

Pobierz ten dokument za darmo

Podgląd dokumentu
Enum types Support-opracowanie - strona 1

Fragment notatki:

Enum types Support
• Enumeration types are used to define a set of named constants that may be assigned to a numeric
value.
• By default the underlying type of each element in the enum is int. But it can be specified another
numeric type by using a colon. Example:enum Months : byte { Jan, Feb, Mar, Apr, May, Jun, Jul,
Aug, Sep, Oct, Nov, Dec };
• When a value is not specified in the defined list, the values are automatically incremented by 1. In
the previous exampleMonths.Jan has a default value of 0.
In order to use enum types inside an Entity Framework defined class it should follow the next steps:
In Visual Studio 2012
Using Database First approach
• Create a new project (make sure .NET framework is target in the New Project dialog.),
• Add a new Entity Model
• Select the Existing Database option
• Select the tables to be imported in the model
• In order to create an Enum Type an integer column should exists inside of a table.
... zobacz całą notatkę



Komentarze użytkowników (0)

Zaloguj się, aby dodać komentarz