EF 6 supports processing of enum
Here's just a concept, because I'm not using this approach.
First, the difference between MySQL and SQL Server
MySQL has an Enum of this type, insert is put in int, when it comes out it will be a string (int to STR is set in MySQL)
MSSQL does not support Enum type, nor is it a good simulation. (Some people use check constraint to simulate, I think not very ideal)
into question,
SQL should use Int.
EF will replace the enum with an int, and we'll just have to enum.
The json.net will process the enum when deserializing,
Not at the time of serialization, but we can tune it ourselves.
Http://stackoverflow.com/questions/2441290/json-serialization-of-enum-as-string
The reason I'm not using it now is that I don't think I can directly see the string value in SQL, unless I open it in C #, which is a bit too dependent.
If you have good practice, you can reply to me. Thank you for this!
Entity Framewor Learning Notes (Enum)