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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:38:29+00:00 2026-05-27T12:38:29+00:00

I have an ASP.NET web application which uses EF4. I have a page with

  • 0

I have an ASP.NET web application which uses EF4. I have a page with an EntityDataSource that filters records from a SQL Server view. There is a GridView bound to my EntityDataSource to display the view records.

I’ve used this approach on many pages where the EntitySet associated with the EntityDataSource is linked to a SQL server table. I’m trying now for the first time to use an EntitySet that is bound to a SQL view.

The EntityDataSource returns the correct number of rows, depending on the where clause parameters.

However, each row returned from the EntityDataSource is exactly the same.

I’ve debugged the GridView’s RowDataBound event and confirmed that every row being bound has exactly the same content each time.

Something that is interesting is that when you page back or forth, the record being repeated changes. I’m guessing that somehow the first (or last?) record in any given page is the one that’s being repeated.

This feels like a bug in EF or the EntityDataSource. Has anyone seen this kind of behaviour before or do you have any advice around how to troubleshoot it?

  • 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-27T12:38:29+00:00Added an answer on May 27, 2026 at 12:38 pm

    I’ve seen this happen in other scenarios when the entity’s key property(ies) that come back from the view are not unique. EF will end up only materializing a single entity and thus the problem.

    Are you sure the properties marked as entity keys are unique within the view?

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

Sidebar

Related Questions

We have an ASP.NET web application which uses ASP.NET Ajax. We open it from
I have an asp.net web-from application which uses ASP.NET membership provider . Beside this
We have an intranet asp.net web application which uses the OOTB ASP.net membership and
I have a ASP.NET web application which has more than 100 pages. Each page
I have an ASP.net web service that I'm using for a web application which
We have a Web application (ASP.NET) which displays in some page links to miscellaneous
I have an ASP.Net 4.0 web application which very frequently loads data from the
I have an asp.net application which uses the web part framework to allow users
I am using VS2005 ASP.NET 2.0. I have a web application which uses Active
I have an ASP.NET web application that uses jQuery on client side. On one

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.