如何在asp.net项目中创建具有多用户和多数据库的单个应用程序? [英] How to create single application with multi users and multi databases in asp.net project?

查看:87
本文介绍了如何在asp.net项目中创建具有多用户和多数据库的单个应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目是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 a ForeignKey to the Companies Table.


这篇关于如何在asp.net项目中创建具有多用户和多数据库的单个应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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