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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:32:13+00:00 2026-06-11T18:32:13+00:00

In an application I am working on, we have actions that trigger when a

  • 0

In an application I am working on, we have actions that trigger when a new entity is added to the repository. One of the new actions is supposed to use a service (as in, service layer, not web service somewhere in the ether) to perform some business-rule manipulations as the object comes in.

This is all well and dandy, but the exact service should be used will vary based on the properties of the entity that we are manipulating (basically, based on which customer the entity is related to). I would like to keep the action loosely coupled to the flavor of service that it may need to call.

What I am thinking about doing is implementing a factory that will accept the entity and return the correct service. This seems a little kludgy, though. Is there a better way to set this up?

I had considered using an IoC container to determine the correct implementation at runtime, but a quick perusal of a couple (Ninject and Windsor) does not seem to indicate that they are well-suited to this sort of operation.

  • 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-11T18:32:14+00:00Added an answer on June 11, 2026 at 6:32 pm

    I think for this iteration, we will keep it simple and use a factory to select the proper interface (i.e. the solution I thought was “kludgy” in the original post). Thanks for all the feedback!

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

Sidebar

Related Questions

Now that I have a read-only application working, I am working on the insert
I am working on splitting out an existing, working application that I currently have
All, I'm working on a Flash application that's supposed to send XML data to
In an application I'm working on, I have the requirement that a user must
I have an application that is essentially working until I tried to implement an
im working on delph 7 application that has lots of actions (more than 50)
I’m currently working on an web application that sends emails. Actions taken place by
I have an application that I am working on, and I'm basically self-teaching GUI
I am working on an auction web application. All auctions have an end date.
I have an working application. Now I want to change the table names of

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.