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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:01:10+00:00 2026-05-24T03:01:10+00:00

I’m implementing an N-Tier architecture in .Net, comprised of an Entity layer, a DAL

  • 0

I’m implementing an N-Tier architecture in .Net, comprised of an Entity layer, a DAL layer, a Business layer, and a UI layer.

The entities, in addition to primitive fields, contain navigation properties. An example of this would be an Invoice entity, which has an InvoiceLines property, which should return all InvoiceLine entities associated with the parent Invoice entity.

Owing to the fact that there is business logic which needs to be applied to these InvoiceLines once they have been retrieved from the persistence medium, and not wanting to duplicate code, the InvoiceLines property on the Invoice entity populates itself via a call to a GetInvoiceLinesByInvoiceID method within the business logic, which returns IEnumerable<Entities.InvoiceLine>.

My problem is this – I cannot separate out the layers into separate projects, since the Entities project depends on the Business project, and the Business project depends on the Entities project, thereby introducing a cross reference. I currently have all 3 layers (Entities, DAL and Business) living in the same project, which works fine, but means I cannot share just the Entities amongst other solutions.

I appreciate that by cross-referencing layers in this way I’m violating some principle, but it’s extremely convenient to have navigation properties populated on my Entities with business logic applied to them.

Can anyone please suggest a better approach, or some way I can do this whilst keeping my layers in separate projects?

  • 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-24T03:01:10+00:00Added an answer on May 24, 2026 at 3:01 am

    I’ve been in this situation myself a number of times and there is usually a simple way out.

    I’ll make a few assumptions here but hopefully they’ll be right. If you’re using an interface based approach your business logic will implement some interface and your entities will implement some interface. Any dependancy from the entity to the business object should only be of the interface and vice versa from the business object to the entity. This should make it quite easy to strip the interfaces in to a separate project (or maybe two), then split out your business logic and concrete entities to their own projects which will only need to reference the interface assemblies.

    Hopefully that makes sense.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is

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.