Map string column in Entity Framework to Enum

前端 未结 8 1140
被撕碎了的回忆
被撕碎了的回忆 2021-02-18 13:46

Is there a way to map a string column to an enum in an Entity Model?

I have done this in Hibernate, but can\'t figure it out in EMF.

8条回答
  •  失恋的感觉
    2021-02-18 14:29

    It's on the roadmap for EF7: https://github.com/aspnet/EntityFramework/issues/242

    You may want to vote for it: http://data.uservoice.com/forums/72025-entity-framework-feature-suggestions/suggestions/2639292-simple-type-mapping-or-mapped-type-conversion-sup

提交回复
热议问题