multi-tenant

What is the best implementation for changing the database schema at runtime using Entity Framework 4?

两盒软妹~` 提交于 2019-12-08 05:43:51
问题 We are building an ASP.Net MVC 2 multi-tenant application on SQL Server using the "single database, separate schema" model discussed, among other places, here and here, where each tenant has one or more users and is split out with its own, tenant specific, SQL Server schema. The application is using Entity Framework 4. In order for users for different tenants to access the data in their schema, we need to be able to specify a schema when creating an entity's ObjectContext. I have seen a few

What is the best implementation for changing the database schema at runtime using Entity Framework 4?

那年仲夏 提交于 2019-12-08 03:33:27
We are building an ASP.Net MVC 2 multi-tenant application on SQL Server using the "single database, separate schema" model discussed, among other places, here and here , where each tenant has one or more users and is split out with its own, tenant specific, SQL Server schema. The application is using Entity Framework 4. In order for users for different tenants to access the data in their schema, we need to be able to specify a schema when creating an entity's ObjectContext. I have seen a few references to this tool ( http://efmodeladapter.codeplex.com/ ) but (1) I would like to not have to

How can i setup multitenant in NESTJS

谁说胖子不能爱 提交于 2019-12-08 02:01:17
问题 I want to connect to any database based on the subdomain (multi-tenant), but i'm not sure how can i do it. My code runs when the app is started, but i don't know how to change the Datasource based on subdomain. PS: I created middleware on each request, but I don't know how to change the source. I have the following code for my DB: import { connect, createConnection } from 'mongoose'; import { SERVER_CONFIG, DB_CONNECTION_TOKEN } from '../server.constants'; const opts = { useCreateIndex: true,

Multi-tenant logging in ASP.NET MVC application

不羁岁月 提交于 2019-12-07 18:15:58
问题 I have a multi-tenant application in ASP.NET MVC 5 that can accept client logins from multiple companies. Currently, I'm using log4net to log to files, but it places all the logs from all the companies in one file. Ideally, I would like to separate out the log files so that the logs for each company resides in its own folder. I see from this question that I can programmatically create additional appenders, which then can log to different log files. But that would mean that for each instance

Spring Batch with multi tenancy

心已入冬 提交于 2019-12-07 15:24:55
问题 How do we define spring batch jobs to run against multiple tenants? I have setup to run a sequence of jobs in order every night against one database schema currently. All the jobs currently read files from a location and insert to database.The batch configuration was very basic where I defined a data-source, transaction manager and mapped job-repository to it. My jobs will point to this repository and transaction manager. Also I am currently persisting batch meta data information in database.

Multi-Tenant Database design - Database for each user

北城余情 提交于 2019-12-07 12:30:44
问题 I am working on a web application that will require users to have their own set of private data. My original plan was to create a stores table, a users table, and a user_stores intersecting table. Then I would, in the stores table, save the database name for that store (and create each store-specific database with an application user and password so the web application could always login). Each store would have similar data (users, products, shipping methods, etc), and I know I can use

Spring or Hibernate multi-tenancy for multi-database Grails app

杀马特。学长 韩版系。学妹 提交于 2019-12-07 08:42:35
问题 Grails has a multi-tenancy plugin for a single database and a multi-tenancy plugin for multi-databases, but the one for multi-databases is no longer supported/maintained. Is there some way I can instead use Spring or Hibernate themselves for a multi-tenancy multi-database Grails application? 回答1: You can use Hibernate multitenancy described here http://docs.jboss.org/hibernate/orm/4.3/devguide/en-US/html/ch16.html OR You can also consider Spring's AbstractRoutingDataSource The general idea is

Symfony2 - Create a Doctrine filter to select current user data

老子叫甜甜 提交于 2019-12-07 05:21:24
问题 I'm building a Saas / Multitenant application using Symfony 2. I've created a Doctrine event-subscriber to add and update the owner of a row, the user who created it, the user who modified it, timestamps and so. And now I need to implement some kind of filter so when a user is logged in, he only can see data from his company. My first though was using a Doctrine preLoad event, but this event doesn't exist... As far as I know, I must use Doctrine filters, isn't it? If so, how can this filter

Azure Multi-tenant application

浪尽此生 提交于 2019-12-07 05:04:11
问题 I need to build an app with Office 365 API and tried several examples provided here: https://msdn.microsoft.com/en-us/office/office365/howto/starter-projects-and-code-samples. I manage to login to tha app with a user from within my own Azure Active Directory, e.g. user.name @ tenant .onmicrosoft.com. But, whenever I use another Office 365 account from another domain e.g. user@pivabo.be I get this error: AADSTS50020: User account 'user@pivabo.be' from external identity provider 'https://sts

how to implement Multi-Tenant functionality in asp.net-core

孤人 提交于 2019-12-07 02:26:27
I have an Asp.net Core application I want to be able to allow multiple/ different Tenant(Client)to access the same application but using different url's. I have common database for all tenant(client). So It is the main part I want to host my application in a domain say... www.myapplication.com then allow different Tenant(client) to access the same application using 1.www.TenantOne.myapplication.com 2.www.TenanatTwo.myapplication.com. 3.www.{TENANCY_NAME}.myapplication.com I can't find any info on how to do this and I'm stuck. How to do it? Please provide the code. Thanks. Sorry,you have to get