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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:49:40+00:00 2026-05-27T17:49:40+00:00

During developing an application with LINQ to SQL, I found that when a stored

  • 0

During developing an application with LINQ to SQL, I found that when a stored procedure returns multiple distinct rows with same primary key then LINQ will make the complete list object same. For example, If I have the following table,

ID  Name  Salary
--  ----  -----
 1    A     20
 2    B     200
 3    C     30
 4    D     520

and my stored procedure returns all rows except with same primary key,

ID  Name  Salary
--  ----  -----
 1    A     20
 1    B     200
 1    C     30
 1    D     520

then linq will bind these rows as,

ID  Name  Salary
--  ----  -----
 1    A     20
 1    A     20
 1    A     20
 1    A     20
  • 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-27T17:49:41+00:00Added an answer on May 27, 2026 at 5:49 pm

    It is not a bug it is a feature. Both entity framework and Linq-to-Sql demands uniquely identified entity and entity with each unique key can be loaded only once so when you return multiple records representing same entity type with same key only first record is materialized into entity and this entity is used for representation of all other records with the same key (so it will not only return the same data but the same reference to the entity). It is called identity map and it is key feature of ORM tools.

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

Sidebar

Related Questions

I'm developing a web application that is targeted at IE and during testing would
i am developing an application that reads and writes data remotely on an SQL
I'm developing an application that supports multiple locales. This is done through a separate
I'm developing a WPF based application that must play some videos during its execution.
I'm developing an app that checks several conditions during an incoming phone call. The
I am developing an application and during my testing on a real device I
I’m developing an application server, during which I constantly edit–recompile–rerun the code. Unfortunately, after
We're developing an application that will have a plug-in architecture to allow consumers of
For example... If I'm developing an application that requires more than one texture in
Im developing desktop java application using maven. I got a *.properties file that I

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.