Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6601931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:48:59+00:00 2026-05-25T18:48:59+00:00

My situation is as follows. I’m using entity framework (4.0) in which I have

  • 0

My situation is as follows. I’m using entity framework (4.0) in which I have defined a relatively simple model like, let’s say, two entities:

  • user
  • transaction

A user can have multiple transactions in this scenario. When generating the database this would result (obviously) in 2 database tables names ‘user’ and ‘transaction’.

The problem is that I want to use the code as a webservice where different companies should have their own environment (read: own users and transactions). A simple solution would be to add a column to both tables like, lets say ‘company_id’ to identify one user/transactions for companya from the user/transaction from companyb.

What I would like to have is a duplication of the tables like so:

  • compa_user
  • compa_transaction
  • compb_user
  • compb_transaction

This way..all data would be nicely separated and if company a generates a lot of transactions, company b would not notice that the system is getting slow or whatsoever.

My question: is there a way to accomplish this based on entity framework. So, can I have multiple tables representing one entity in my model and switch from table to table depending on which company is connecting to the service.

Any help appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:49:00+00:00Added an answer on May 25, 2026 at 6:49 pm

    If you really want to keep the tables seperate, then a seperate database for each client would be the easiest – only need to change the connection string in EF.

    The other benefit of this model (seperate databases) is that the database will scale quite easily as each database could theoretically be on a different database server should the DB ever become the bottleneck.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My situation is as follows: I've got a JList which triggers a search (using
The situation is as follows (I am using Rails 3.1). I have the following
Situation: I have a simple XML document that contains image information. I need to
I have a situation as follows <body> Test<br /> test<br /> test1<br /> </body>
Suppose I have a diamond inheritance situation as follows: class A{ public: virtual void
The situation is as follows: there's a website that connects sellers and buyers, like
The situation is as follows: I have a series of big, fat PDF files,
I am using jquery selectable plugin and running it to a situation as follows.
Situation: I have 3 tables: Student, Address, StudentAddressLink As follows Note* not EXACT yaml
I commonly run into the following situation where I have a data structure which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.