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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:32:32+00:00 2026-06-12T06:32:32+00:00

I am currenly reading julie lerman’s entity framework book (2nd edition) and implementing its

  • 0

I am currenly reading julie lerman’s entity framework book (2nd edition) and implementing its examples on VS 2012.

For those who know/read it, i am currently on chapter 9, using BreakAway database model.

This is the link to download the DB from her site: (on chapter 8)

http://learnentityframework.com/LearnEntityFramework/downloads/#2ed

When i try to do just a small query like:

var context = new BAGA.BAEntities();
List<BAGA.Customer> customers=
context.Customers.Include("Contact")
.Include("PrimaryActivity")
.Include("SecondaryActivity")
.Include("PrimaryDestination")
.Include("SecondaryDestination")
.Include("Reservations.Trip.Destination")
.ToList();
customerBindingSource.DataSource = customers;

I get the exception say’s: An item with the same key has already been added.

I read on some posts that there’s might be a problem with primary or foreign keys in the scheme but couldn’t find one issue on the database that can cause this.

Can someone point the problem on that database’s tables or the domain model it creates?
I am using VS2012 for the examples on the book.

Or, am i doing somthing wrong? (although, i haven’t do anything yet :))

Thanks

  • 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-12T06:32:33+00:00Added an answer on June 12, 2026 at 6:32 am

    I think someting is wrong is your database, because I have no errors when I try your query in theses samples.

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

Sidebar

Related Questions

I'm currently reading the book Pro Asp.Net MVC Framework. In the book, the author
I am currently reading K&R's book and typing in the examples from the first
I'm currently reading The C Programming Language 2nd edition and I'm not clear about
Currently reading Bloch's Effective Java (2nd Edition) and he makes a point to state,
im currently reading a book about programming Android and there is a nice little
Im currently reading Spring in Action 3rd edition, and have been experimenting with Spring
I'm currently reading Head First's Object Oriented Analysis and Design. The book states that
I am currently reading a book about bit fiddling and the following formula appears:
I'm currently reading the django book and their instructions aren't working for me. People
I am currently reading a book on Javascript by Pragmatic, and I'm confused about

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.