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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:52:56+00:00 2026-05-26T08:52:56+00:00

Is there a way such that the data access classes inside a repository are

  • 0

Is there a way such that the data access classes inside a repository are updated whenever there is a state change (environment or exception flow encountered) inside a N-tier application? In my program I have the following:

  • DAC Repository. Holds a delegate to “observe” the program and update the connection dictionary.
  • Connection Dictionary. Lists all of the connection strings per env and rdbms type.
  • Business Layer. Encapsulates the data transactions. This one has a constructor accepting the DAC Repository by value.

I suspect this would be a case of pass-by-value issue with the DAC Repository to the BLL, but unsure. The connections work fine with repository and the DACs do get updated if I’m not using the BLL, but once the BLL is integrated, the BLL starts to use only default connections.

Is there something that I might have missed? Should I make the BLL be observing the DAC repository as well?

  • 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-26T08:52:56+00:00Added an answer on May 26, 2026 at 8:52 am

    Perhaps try using IoC container for this? I am not sure I got this correctly, but if you need to observe some settings that might change you can pass a type (or interface) to the constructor of the types that require to observe the settings. Every time you need to apply new settings you just discard an old instance of the type and create a new one passing updated settings.

    Settings currentSettings = ContainerService.Instance.Resolve<Settings>();
    SomeType t = new SomeType(currentSettings);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to bundle PowerShell such that I don't have to install
Is there a way to specify a Model in Django such that is ensures
Is there a way to combine 2 vectors in MATLAB such that: mat =
Is there a way to extend the SPGridView control in a webpart such that
Is there a way to integrate StyleCop in a NAnt script such that the
Is there a way to set permissions in a directory such that: Every user
I'm looking for a way to create a data access layer that can either
...is there any way of checking such thing? The default option as i remember
Is there a way to abort a python write operation in such a way
Is there any way to specify optional parameters (such as when search parameters are

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.