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

  • Home
  • SEARCH
  • 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 8187839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:41:53+00:00 2026-06-07T02:41:53+00:00

I generated a Visual Studio 2010 entity data model derived from a (mysql) database

  • 0

I generated a Visual Studio 2010 entity data model derived from a (mysql) database.

Users
- UserID
- Username
- UserGroupID

Groups
- GroupID
- GroupName

The edmx diagram properly shows the relationship between the two tables (one to many). If I drag & drop the users datasource onto a form, a datagridview shows up, and it is correctly populated with the username, etc when I run the application. However, it shows column with the (correct) UserGroupID, instead of GroupName. I tried to follow these instructions to get the GroupName to show up, but then I get an error that says

Error 3024: Problem in mapping fragments starting at line ###:Must
specify mapping for all key properties …

It seems that this works for one-to-one relationships but not one-to-many.

Is it not possible to display the users table with the groupname in a datagridview without adding classes manually, when using a model-first entity data model? If it is indeed not possible, then what is the simplest way to display (and edit) this in datagridview (i.e., possibly not using entity data model?) I thought this would be a rather common scenario, which makes make think that there should be a visual tool-based approach for doing this.

As a tolerable approach, I tried to create a view that displays what I like. I was able to add that view to the model, and add the entity as a data source. However, when dragging that data source onto a form, nothing was displayed in the datagridview. The plot thickens.

  • 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-07T02:41:55+00:00Added an answer on June 7, 2026 at 2:41 am

    Pff! I gave up on the entity model, and just ended up using good old MySqlAdapter, BindingSource, DataTable.

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

Sidebar

Related Questions

I have created a Entity Framework 4 model with Visual Studio 2010 and generated
I have a DLL generated from Visual Studio 2010, but I need to link
I have a Visual Studio 2010 Database project, from which I want to generate
I created a database in Visual Studio 2010 from Server Explorer. I want to
I've inherited a visual studio 2010 mvc3 applicaton and the web.config is being generated
To begin with: Using Entity Framework v4.0. ASP.NET MVC 2.0. Visual Studio 2010. I
I am using Visual Studio 2010 and would like to exclude the generated service
My scenario I'm using Visual Studio 2010 with Entity Framework 4.1 I have a
I am using the latest beta of Visual Studio 2010 and the Entity Framework.
I created client from wsdl file using visual studio 2010 Pro, created new project,

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.