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

  • SEARCH
  • Home
  • 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 934397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:59:36+00:00 2026-05-15T20:59:36+00:00

We are building an ASP.Net MVC 2 multi-tenant application on SQL Server using the

  • 0

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 update the code every time the EDMX is generated as specified in the Usage instruction and (2) it was produced before EF4 so I am hoping there is an easier way now.

So, what is the best way to do this in EF4?

Thanks

  • 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-15T20:59:37+00:00Added an answer on May 15, 2026 at 8:59 pm

    Well, ok then. For future searchers, what I have implemented is something like this example, though I load the ssdl, csdl, and msl from the embedded resources like this example.

    In implementation, I when creating a repository object in an MVC action request, I take use a user context to determine what schema is needed, use the previously noted example to write the schema and create an EntityConnection and then use it create my ObjectContext entity.

    It seems to function pretty well, though I am a bit concerned that it intuitively seems like it might be a performance problem.

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

Sidebar

Ask A Question

Stats

  • Questions 499k
  • Answers 499k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Check that the assembly referenced in the Web Application matches… May 16, 2026 at 12:43 pm
  • Editorial Team
    Editorial Team added an answer First, you really shouldn't store 3 GB files in SVN.… May 16, 2026 at 12:43 pm
  • Editorial Team
    Editorial Team added an answer Try using NChar instead of Char: SELECT NCHAR(193) May 16, 2026 at 12:43 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm building a multi-tenant app with ASP.NET MVC and have a problem with validating
I'm building a small web application with ASP.NET MVC 2, using db4o as a
When building a multi-lingual website (with ASP.NET web forms), I'll use an HTTP module
I'm building ASP.Net MVC aplication based on UnitOfWorkApplication and I'd like to use Castle
I am succesfully building ASP .Net applications in NAnt using the ASP Compiler, without
I'm building an ASP.NET MVC site where I plan to use Lucene.Net. I've envisioned
I'm building an ASP.NET MVC site where I want to use Lucene.Net for full-text
I am reading this asp.net article on building your first asp.net mvc 2 website
I am building an asp.net MVC2 web app using StructureMap. I have created a
I am building an asp.net site in .net framework 4.0, and I am stuck

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.