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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:11:53+00:00 2026-06-14T15:11:53+00:00

I am creating an application for multiple clients, whereby there are both similarities and

  • 0

I am creating an application for multiple clients, whereby there are both similarities and differences between the implementations for each client. I am using a mix of Win Forms and WPF for the UI and Entity Framework for the ORM. What I need is the ability to reuse shared components wherever possible.

One of the key issues is that the database for one client is oracle and the other is MS Sql, now I have got both working but only by changing elements at compile time. This means I have to have two sets of near identical projects, with just slightly different data projects. If a bug is found in one UI I have to open the other solution and edit it there also.

I have used Ninject on previous projects and though it might be possible to somehow invert the control of the Data project, injecting the specific project/classes into the UI, rather than the UI calling them directly.

The issue that I can’t seem to figure out is how to inject an entire project. I want to be able to say in the UI db.Customers.ToList(); and have it return the customers from whichever data project I have injected. The database models for both clients are the same at this point, though they might change in the future.

I’m sure there must be a pattern that would allow me to use these resources in a shared capacity.

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-06-14T15:11:54+00:00Added an answer on June 14, 2026 at 3:11 pm

    At what point can you make the decision about which type of connection you need?

    This might be terribly naive, but couldn’t you just use an app setting to fire up the appropriate type of connection factory or repository at runtime? The simplest version of which:

    public class MainWindow : Window
    {
        private IRepository _repo;
    
        public MainWindow()
        {
            _repo = ServiceLocator.GetRepo();       
        }
    }
    
    
    public class ServiceLocator
    {
        public static IRepository GetRepo()
        {
            var typeOfDb = AppSettings["TypeOfDb"]
    
            if(typeOfDb == "Oracle")
                return new OracleRepo();
            else
                return new SqlServerRepo();
        }
    }
    

    Would this work? Or have I missed the point entirely?

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

Sidebar

Related Questions

I am creating an application to be accessed by multiple clients, but each customer
I am creating a client server application using c sharp. The server is using
I am currently creating an application for compiling multiple java projects in one go
I am creating Facebook application which get insights for user's page for multiple metric.
I'm creating my first application and I have a window consisting of multiple subclasses
Im creating application in java using XML. XML- <?xml version=1.0 encoding=UTF-8?> <songlist id=slist> <song
Consider a process which is creating multiple application domains. Do these Application domains share
I am creating a application that requires to store multiple attributes, and it will
I'm creating an application that needs to run under multiple databases. I currently have
I'm creating an application (using PHP / Codeigniter / MYSQL) for tracking volunteers at

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.