Dynamic table name with entity framework

后端 未结 3 620
花落未央
花落未央 2020-12-29 06:42

I have many tables with the same model structure but with other table names with other data (in this case will be ~100 tables). I want to dynamically switch table name in ru

3条回答
  •  攒了一身酷
    2020-12-29 07:09

    I did something like this. http://nodogmablog.bryanhogan.net/2013/08/entity-framework-in-an-dynamics-nav-navision-envirnoment/

    I had tables which were identical, but they had different names. For example, a customer table but with different prefixes for different companies.

    [ACME$Customer] 
    [SuperCorp$Customer]
    

    I ended up using dynamic compilation. It's a pretty detailed blog post so I won't go into it here.

提交回复
热议问题