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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T06:16:10+00:00 2026-05-17T06:16:10+00:00

I’m finally getting around to checking out the latest EF release and I’m running

  • 0

I’m finally getting around to checking out the latest EF release and I’m running into some troubles with my testing.

So, my DAL layer holds my .EDMX file and I’m using the MS POCO template so I also have the generated .TT files and classes.

I have a generic base class in the TestProject.DAL I’ve created that those classes derive from.
I.e.

public class BaseEntity<T> {}
public class Customer : BaseEntity<Customer> {}
public class Product : BaseEntity<Product> {}

Then in my TestProject.BLL layer I have some derived classes
I.e.

public class TestProject.BLL.Customer : TestProject.DAL.Customer {}
public class TestProject.BLL.Product : TestProject.DAL.Product {}

Then, in my UI layer I’m calling my BLL.Customer object.
I get an error saying that the reference to the DAL.Customer object is not added, etc.

I have a reference to the BLL project from my UI project and a reference to the DAL from my BLL project.

Why is the UI layer complaining that it knows of the DAL layer when it’s not referenced in that project?

Also, as a side question, does this look like a “good” design?

Thanks all!
Goosey

  • 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-17T06:16:10+00:00Added an answer on May 17, 2026 at 6:16 am

    Craig is correct – your UI is referencing the POCO entity types. But I’ll elaborate a bit more.

    If you were in a situation where your UI project was referencing the BLL assembly and that assembly was referencing the DAL assembly and not publicly exposing any members from that DAL assembly, then what you are saying would be correct. But that is not what is happening here. You are referencing the BLL assembly and the types in that assembly directly inherit from the DAL types and therefore the DAL types are publicly visible to your UI. Therefore, the compiler is (correctly) telling you that you must reference the DAL assembly from your UI project.

    As to your “good design” question, that always depends on context. Without knowing any of your context, I would hesitate to create an inheritance tree like this. What is the job of your sub-classes in the BLL assembly?

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

Sidebar

Related Questions

No related questions found

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.