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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:46:06+00:00 2026-05-14T08:46:06+00:00

I am using ASP.NET MVC2 on top of a MySQL database in VS2008. I

  • 0

I am using ASP.NET MVC2 on top of a MySQL database in VS2008. I am using the MySQL ADO.NET connector 6.2.3 to provide the connection for the ADO.NET Entity Data Model.

This is mostly working ok, however navigating via foreign keys is causing me a real headache!

Here is a simplified example..

Car (Table)
CarID PK
Colour
Doors
ManufacturerID FK

Manufacturer (Table)
ManufacturerID PK
Name

In the edmx file I can see the 1-many relationship shown as a navigation property in the both the Car and Manufacturer tables. I create a Models.CarRepository that allows me to returns a IQueryable.

At the View I want to be able to display the Manufacturer.Name for each car. This is not accessible via the object I get returned.

What is best way to implement this? Have I encountered a limitation of the Entity Framework/MySQL combination?

  • 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-14T08:46:06+00:00Added an answer on May 14, 2026 at 8:46 am

    Eager loading of the related records needs to be enabled in the Model Repository. Something like:

    var allCars = from c in automobileEntites.Car.Include("Manufacturer")
                  select c;
    

    This then makes the related records available for subsequent query/display.

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

Sidebar

Related Questions

I am using ASP.NET MVC2 and Entity Framework. I am going to simplify the
I'm building ASP.Net MVC2 application on top of a legacy database. Every table in
Using asp.net mvc2 on vs2008 on local machine and hosting on a shared server
I'm using ASP.NET MVC2 RC and I have built security on top of the
We've been working with ASP.Net MVC2 based web app. We're using DataAnnotations for model
I have an Asp.net MVC2 web application. I built the application using VS2008 and
I'm using ASP.NET MVC2. I love how I can annotate my model's fields and
I'm using ASP.NET MVC2 and I have the following object structure: public class IDealer
I'm using asp.net mvc2 and trying to send a list of json objects with
[NOTE: I'm using ASP.NET MVC2 RC2.] I have URLs like this: /customers/123/orders/456/items/index /customers/123/orders/456/items/789/edit My

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.