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

The Archive Base Latest Questions

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

I have a three layers C# software : UI, Business, Database. I have some

  • 0

I have a three layers C# software : UI, Business, Database.

I have some business rules that I want to implement into my business layer. For instance, if two objects have the same name, the business layer needs to throw an exception to the UI.

My problem is that my application is multi language, and my business layer don’t have access to my resource files. So my UI needs to catch the exception from the business layer, and decide what message it will show to the user.

I was thinking about creating a BusinessException class, with a property who tells the UI which key to take in the ressource file. Do you thing it a good way to do it? Or do you have better ideas? Thank you!

  • 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-11T16:13:45+00:00Added an answer on June 11, 2026 at 4:13 pm

    I ended up with a mix of those two solutions. So I’m using only one class : BusinessRuleException. This class as a property “rule” which is a enum of all my business rules.

    When my UI receive a BusinessRuleException, it can catch it, and than compare the “rule” to a ressource file and get a friendly message for the user. If the UI can’t find a translation, it will only send the rule as is. So the user still have a change to understand what is going on.

    It don’t like the solution of a different exception for every different business rule, because it will end up with so much extra code, which doesn’t help you understand what is the real work you class is doing.

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

Sidebar

Related Questions

I have an application with three layers (Presentation, Business Logic, and Data Access). In
Have three divs in a container that I want to float over a large
I have a software setup with 2 layers, a core layer and a customer
I would want to compile existing software into presentation that can later be run
I have an MSMQ-based system with three layers that communicate with each other. For
I have a three 'layers' deep model, that i's like to access through my
I have a three tier system, SQL Server backend, hand written data access layer,
I'm starting to implement some sort of remote screencasting (VNC-alike) client/server software in C++
This bothers me a bit: Suppose you have a matrix with three layers. Is
As a software engineer, I have a strong bias towards writing business logic in

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.