Entity Framework map multiple tables to one entity

前端 未结 5 709
抹茶落季
抹茶落季 2021-01-18 04:50

I have a database with a table for active orders and one for inactive orders. I would like to model this in Entity Framework as one entity called Orders. I also need a way t

5条回答
  •  借酒劲吻你
    2021-01-18 05:27

    A good way to do one entity that shares multiple tables is to use Entity Splitting. MSDN has a very simple tutorial that walks you through the process which is very easy, however, you may need to reshape your data model: http://msdn.microsoft.com/en-us/data/jj715646.aspx

提交回复
热议问题