不同型号的相同表格 [英] Same table in different models

查看:79
本文介绍了不同型号的相同表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的MVC5应用程序中有2个区域。每个模型都有自己的edmx文件,其中包含相关表格。我有几个常见的ASP.Net Identity相关表。我如何处理这个问题

1)我可以在不同区域的两个型号中使用aspnetUsers表吗?



请指导我以及相应的文章。

Hi, I have 2 areas in my MVC5 application.And Each model have its own edmx file with the related tables in them. I have few ASP.Net Identity related tables that are common for both. How do i proceed with this i.e
1)Can i have the aspnetUsers tables in both the models of different areas ?

Please guide me with an appropriate article on this.

推荐答案

您可以在不同的模型中使用相同的表格。但只要数据库不同,模型EDMX就会有所不同。因此,如果您的项目中有多个数据库,那么最好在您的应用程序中使用Linked Server。

MSDN LINKED SERVER [ ^ ]

您可以点击上面的链接了解更多详情



谢谢
You can have same tables in different models. But the Model EDMX will be different as long as the databases are different. So if you have multiple databases to be used in your project, then it is better to use Linked Server in your application.
MSDN LINKED SERVER[^]
You can follow the above link for more details

Thanks


这篇关于不同型号的相同表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆