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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:30:41+00:00 2026-05-28T06:30:41+00:00

I am facing the same dilemma as it is mentioned in this Question. Repository

  • 0

I am facing the same dilemma as it is mentioned in this Question.

Repository Pattern in Layered Architecture

Is Dependency Injection the way to proceed ahead?
Is this Patterns suitable for ASP.Net MVC type framework?

I would like to know how the industry is implementing the Repository Pattern in 3 Tier Architecture.

Regards

  • 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-28T06:30:42+00:00Added an answer on May 28, 2026 at 6:30 am

    There is answer given in the question you just mentioned. You really don’t need to reference DAL in directly in you code, instead of this you should use IoC. This way you can easily separate the dependency between the layers. and using IoC can also make this possible to make unit test of your BLL Repository methods.

    Q:Is Dependency Injection the way to proceed ahead? Is this Patterns suitable for ASP.Net MVC type framework?

    A:Repository Pattern is suitable for MVC. the main advantage of using repository pattern with IoC/Dependency Injection is to separate layer of concern and make you classes unit testable.

    Q:I would like to know how the industry is implementing the Repository Pattern in 3 Tier Architecture.

    A: as described in the other question you mentioned. Repository Pattern in Layered Architecture. you can try implementing repository pattern in you Business Logic Layer. and in presentation layer you can using IoC to setup you classes and their dependencies.

     public static class ServiceLocator
        {
            public static readonly IUnityContainer IoC = new UnityContainer();
    
            static ServiceLocator()
            {
                IoC.RegisterInstance(IoC, new ContainerControlledLifetimeManager());
            }
        }
    

    This is how you can setup IoC in global.ascx

            ServiceLocator.IoC.RegisterType<ICampusRepository, CampusRepository>();
            ServiceLocator.IoC.RegisterType<IReasonRepository,ReasonRepository>();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In reference to this question, I am facing almost the same scenario except that
This question is in context with the problem mentioned in this thread . I'm
i am also facing same problem .. by doing this background music stop but
I wonder if anyone else is facing the same issue. I have a UITextView
I am facing a very strange problem where the same loop keeps giving me
I'm facing a problem with IE6. I took the toggle function from this website
My development team of four people has been facing this issue for some time
I'm facing the same issue others already posted on SO: On reading objects from
I'm facing the same issue, while trying for cross-domain request. Situation is strange, my
I think lot of people are facing the same problem . In detail view

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.