如何在asp.net项目中创建具有多用户和多数据库的单个应用程序? [英] How to create single application with multi users and multi databases in asp.net project?
问题描述
我的项目是CRM应用程序,我想在云基础上创建它,所以想要创建具有多用户和多数据库的单个应用程序。但是我创建了具有多用户和单个数据库的单个应用程序。为此我只是通过了用户id到每个表的检索,插入和更新。现在如何在asp.net项目中将其更改为具有多用户和多个数据库的单个应用程序?
引用:如果公司想要多个用户,那么就不能为这些用户维护一个数据库。
你可以。只需将一个新列添加到Users表中,作为
CompanyId
,这将是公司表的ForeignKey
。
My project is CRM application which i want to make it on cloud base, so want to create single application with multi users and multi databases.But i was created single application with multi users and single database.For this just I pass the user id to every table for retrieve,insert and update.so now how to change it to single application with multi users and multi databases in asp.net project?
Quote:if company want more than one user then cant maintain one database to those all.
You can. Just add a ne Column to the Users Table as "
CompanyId
", which would be aForeignKey
to the Companies Table.
这篇关于如何在asp.net项目中创建具有多用户和多数据库的单个应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!