【发布时间】:2017-07-05 07:41:00
【问题描述】:
是否可以使用来自两个不同数据库的两个上下文实体
代码连接到一个实体:
Using one FoodSupplyEntities
using (var contextFood = new FoodSupplyEntities())
{
var _result = (from _FoodSupplyStatus in contextFood.FoodSupplyStatus
join _FoodQualityStatus in contextFood.FoodQualityStatus
但是是否可以连接来自另一个服务器的不同实体的另一个表?
样品(不知道,但它可能是这样的。)
using (var contextFood = new FoodSupplyEntities() and contextKitchenware = new KitchenwareEntities() )
{
var _result = (from _FoodSupplyStatus in contextFood.FoodSupplyStatus
join _KitchenwareSupplyStatus in contextKitchenware.KitchenwareSupplyStatus
【问题讨论】:
标签: c# linq-to-entities edmx