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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:37:20+00:00 2026-05-25T02:37:20+00:00

I am using Repository design pattern Martin’s Fowler in my application (MVC3, WebForms) also

  • 0

I am using Repository design pattern “Martin’s Fowler” in my application (MVC3, WebForms) also i use “ONLY ONE” DbContext (“Singletone”) through out all of my application.

Details:
Repository is looks like that,

class Repository<T> : IRepository<T>, IUnitOfWork

only one repository wich i create many more repositories, like so:

class UserRepository {
   private IRepository<User> _repository;
   //dependency injection via constructor using Ninject 
   public UserRepository(IRepository<User> repository) {
       _repository = repository;
   }
}

and so on…

What is best practice in these cases, what you are suggestion to make better???

I have to increase my performance and of course to learn the correct way to do it.

Thank you all for the answers.

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

    You are using one context for the whole application = you are done. Your application will not work. You must change it to use a new context instance for each request.

    Also I wonder how is your question related to performance and what should your code snippet represent?

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

Sidebar

Related Questions

I am using a Repository pattern with filters in my MVC application. The project
After reading on the benefits (and using) the Repository Design pattern within an ASP.NET
I am using a repository design with web applications (repository (data layer) exposing model
I'm getting into using the Repository Pattern for data access with the Entity Framework
What is a typical approach to using the repository pattern with .NET 1.1 (C#)?
I am not very sure what design pattern is the most efficent to use
I am creating a Web application using ASP.NET MVC, and I'm trying to use
I've read DDD Evans, and I' experimenting with an aggregate root repository design using
I am using the UnitOfWork/Service Layer/Repository/EF4 w/POCO design in my MVC app. So far
I'm working with a new Entity Framework repository and need System.data.entity.design.dll for using the

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.