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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:57:18+00:00 2026-06-12T00:57:18+00:00

I am returning to programming after focusing on databases for a number of years.

  • 0

I am returning to programming after focusing on databases for a number of years. I used to be a gun in VB6 but .Net has me floundering.

I am attempting to build a web app in MVC from an already existing database. I am roughly following this: http://msdn.microsoft.com/en-us/data/gg685489.aspx

I’m using Visual Web Developer Express 2010 10.0.40219.1 SP1Rel
I’m not sure how to work out the versions of the various templates and plugins.

I am generating an entity data model from an exsting database. The three tables I’m using have Primary and Foreign keys defined, however when I import it, no associations are created in the data model

There seems to be a lot of different ways to build a database enabled web app. If I was more familiar with the syntax I could have hand coded it by now.

Q1: Any idea why associations are not created?

Q2: Can you verify that I need associations to tell the code generator how everything fits together? (i.e. autogenerate the appropriate methods in code). I can’t see how it would work otherwise.

Q3: If I create associations manually and Build, I get some errors. It appears that creating associations creates a property against the entity (‘CustomerCustomer_ID) and this needs to be mapped to something. However when I press ‘Table Mapping’ this isn’t in the list to map and I can’t add it.

Error   1 Error 3004: Problem in mapping fragments starting at line 198:
No mapping       specified for properties Task.CustomerCustomer_ID in Set Tasks.
An Entity with Key (PK) will not round-trip when: Entity is type [zzzz.Task]
Error   2 Error 11009: Property 'CustomerCustomer_ID' is not mapped.

Here’s the abridged DDL for two of the tables that I would expect would generate associations

CREATE TABLE [dbo].[Customers](
    [Customer_ID] [int] IDENTITY(1,1) NOT NULL,
    [Customer_Name] [varchar](50) NOT NULL,
........
....
CONSTRAINT [PK_Customers] PRIMARY KEY CLUSTERED 
([Customer_ID] ASC))

CREATE TABLE [dbo].[Tasks](
    [Task_ID] [int] IDENTITY(1,1) NOT NULL,
    [TaskType_ID] [int] NOT NULL,
    [Emp_ID] [int] NOT NULL,
    [Customer_ID] [int] NOT NULL,
    [Status_ID] [int] NOT NULL,
    [Task_Desc] [varchar](300) NULL,
.....
..
CONSTRAINT [PK_Tasks] PRIMARY KEY CLUSTERED 
(
    [Task_ID] ASC
)

ALTER TABLE [dbo].[Tasks]  WITH CHECK ADD  CONSTRAINT [FK_Tasks_Customers] 
FOREIGN KEY([Customer_ID])
REFERENCES [dbo].[Customers] ([Customer_ID])
GO
  • 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-12T00:57:19+00:00Added an answer on June 12, 2026 at 12:57 am

    As posted above, this is how I worked around this issue:

    I created the remaining missing associations like this:

    1. Right click on design surface, Add Associations
    2. Define Associations, give it a name, set up the correct cardinality
    3. UNTICK ‘Add foreign key properties the the….’ and press OK
    4. Click on the association on the work service and in the properties page click on the Referential Constraint property and define it (principal is your ‘lookup’ side)

    Thanks for trying to help everyone but I suspect my issue might be hard to reproduce.

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

Sidebar

Related Questions

This is slightly off topic of programming but still has to do with my
After programming in C for several years, I realized that I have been ignoring
I am doing a database programming and it was working fine. But after I
Android programming. I have a json returning the date from a database as a
I have a service returning an array of type BaseItem. BaseItem has N subtypes.
I'm returning some Json via a C# MVC Controller. Other browsers work fine, but
I am new to programming.I have seen this code.returning a derived class object to
Android Programming The following code int year = new Time().year; is returning value of
Relational Database: Sql Server 2008 Programming Language: C# Used Framework: Enterprise Library 5.0 How
I'm working in PHP (but in this case I think the programming language doesn't

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.