Hello,
One of my entities has a column defined as an enum. When I store the value in a database it stores as int, however when I retrieve the value EF automatically converts it into the enums string value. I would like to only return back the integer instead of the friendly name so my client application can handle casting.
Iv looked into HasConvertion however I cannot figure out how to return an int instead of the enum string value.
How do I return int instead of enum value?
Re: How do I return int instead of enum value?
Sorry, the issue is not clear. If you need to retrieve int value, please set the type of your class property to int.RaminNoodle wrote: ↑Thu 16 May 2019 23:16One of my entities has a column defined as an enum. When I store the value in a database it stores as int, however when I retrieve the value EF automatically converts it into the enums string value.