EF5 Code First Enums and Lookup Tables

后端 未结 6 1704
南笙
南笙 2020-11-27 05:35

I\'d like to define an enum for EF5 to use, and a corresponding lookup table. I know EF5 now supports enums, but out-of-the-box, it seems it only supports this at the objec

6条回答
  •  粉色の甜心
    2020-11-27 05:47

    you must customize your workflow of generation

    1. Copy your default template of generation TablePerTypeStrategy
    
    Location : \Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\DBGen.
    
    2. Add custom activity who realize your need (Workflow Foundation)
    
    3. Modify your section Database Generation Workflow in your project EF
    

提交回复
热议问题