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 6860061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:21:41+00:00 2026-05-27T02:21:41+00:00

using MVC3, Code First (DbContext) Is there a way to implement (ideally) a facade

  • 0

using MVC3, Code First (DbContext)

Is there a way to implement (ideally) a facade or maybe a service layer to decouple MVC3 / EF4.2 WITHOUT also writing up repositories and unit of work? I see repository and unit of work as utterly redundant as they are already in EF. I think people who create those are missing the point but maybe I’m misguided.

Rather, I’d like to see some sort of manager for multiple DbContexts and a Facade making use of that but I can’t for the life of me work it out.

Any ideas? Ideally a pointer to a really good reference project would be perfect.

To be clear, I want [Any Client] -> ([Service] | [Facade]) -> [Model] -> [Data] with no need to incessantly create repository classes.

R.

P.s. This sort of thing was an inspiration: (ObjectContextManager). You can cut out a hell of a lot of code by making that lot reusable and then only worrying about writing your facade classes.

  • 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-27T02:21:41+00:00Added an answer on May 27, 2026 at 2:21 am

    This turned out to be a fascinating detective trail. Reading about the different methods has led me to believe that although a LOT of people write about and use these myriad methods, precious few actually truly understand the actual real world application or need of these methods. Emphasis on real world.

    In my searches, I remembered I had a copy of the .Net 4 Design Patterns from http://www.dofactory.com. In that there is a reference application (Patterns in Practice) and deep within that is the answer (if not the actual implementation) to my question.

    Light at the end of an unnecessarily long tunnel and all that.

    Eventually, I’m hoping the next release of WCF Data Services, oData and Entity Framework will allow me to throw away just about everything and then just have client -> service -> domain; all in wonderfully simple code.

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

Sidebar

Related Questions

I just created a new project in MVC3 using EF4 code first deployed on
Using VS2010, .NET4.0, MVC3, EF4.1 Code-First I have this POCO entities: public class XBLContent
I have an MVC3 project I created using the Code First paradigm and it
Using Entity Framework 4.1 code first and POCO entities in MVC3; I would like
I'm writing an ASP.net MVC3 application using Entity Framework Code First and SqlCe4. I
I'm currently developing an app using ASP.NET MVC3 and Entity Framework 4.1 Code First
I'm creating a multi-tenant Asp.Net MVC 3 Web app, and using EF4.1 code first
I am working on a mvc3.0 app using EF code first and mvc scaffolding.
I am creating a data driven website with mvc3 using EF and code first.
I have developed a project using MVC3 and Code first Entity Framework 4.0 as

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.