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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:11:47+00:00 2026-05-15T04:11:47+00:00

I have what seems to be a simple question about EF 1.0 and have

  • 0

I have what seems to be a simple question about EF 1.0 and have been looking all over the web for a simple answer, but have had no luck so far:

We’re about to build a small application with SQL Server as the backend and have been considering using EF 1.0. Our company, like many large corporations, does not move quickly in adopting new platforms, which means .NET 4.0 won’t be installed on machines for quite a while, so EF 4.0 is not a possibility.

Here’s the question (based on an extremely simple example):

Three tables in a many to many relationship:

Order: OrderID (PK), Customer, OrderDate

OrderDetails: OrderDetailID (PK), OrderID (FK), ProductID (FK), Quantity, BackOrdered

Product: ProductID (PK), ProductName, Category

What we what to create is an Order instance that has the Order information and a list of the OrderDetails including the ProductName

The SQL for this is trivial, so I won’t bore you with that. And getting the Order and the list of OrderDetails is easy in EF 1.0, too. But when you get the list ProductID will identify the Product, and we need ProductName.

We’ve looked at this article. Is this the only way to accomplish what we need? Seems like a great deal of work…

Thanks for any help

  • 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-15T04:11:47+00:00Added an answer on May 15, 2026 at 4:11 am

    Extrapolating from your description, and if a select is what you’re looking for, something along those lines could work :

    var query = from o in context.Order
                                 .Include("OrderDetails")
                                 .Include("OrderDetails.Product")
                select o;
    

    you can then access the information through navigation properties, such as:

    // using first here just for exemple purpose.
    Order o = query.First();
    var details = o.OrderDetails;
    var aProductName = o.OrderDetails.First().ProductName;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a what seems to be a simple question but for the life
I have a simple question whose answer seems not to be in the official
I have a fairly simple question, however the answer seems to elude me. If
This question might seem strange but I have been searching for an answer for
This seems like such a simple question. I have several Edit boxes on my
I have a relatively simple question that I cannot seem to find the answer
I have what is undoubtedly a simple question, but I can't seem to find
Simple question which I can't seem to find an answer of: I have two
The answer to just about every single question about using C# with JSON seems
I have a simple question about the most efficient way to perform a particular

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.