What I have for my enum is listed below. very simple There is NO database table that corresponds to the enum. Instead, the database has an int column whenever a class has a MyEnum attribute. Everything is functional....public enum MyEnum : int
Zero = 0,
One = 1,
Two = 2
...This is my class, and the database has a separate table for ...
Entity Framework 6 is what I'm using, and I need to:...Map a table column to an Enum as step one;...2 - Connect an enum to a lookup table (which has two columns: Id and Name)....Exists a way to do this with Entity Framework 6?...I'm grateful.
You can disable code-first database initialization for your database by include the following in the constructor of your context:...Database.SetInitializer<YourContext>(null);
...This ought to stop any effort to gain access....dbo.__MigrationHistory...
Switch to Entity Framework ...Core... for the 2019 Update (or whatever else)...While lacking some "Features," EF Core correctly honors Alternate Keys (also known as Unique Constraints) in addition to Primary Keys, which honors Relational Algebra ...much... better. If not, YMMV; at least it correctly supports a lot more SQL techniques....It is somew...