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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:59:33+00:00 2026-06-03T03:59:33+00:00

When I use against a dbase(oracle) View from f in MYVIEW where f.Order==HERE select

  • 0

When I use against a dbase(oracle) View

from f in MYVIEW
where f.Order=="HERE"
select f

I get identical results(rows).

With…

from f in MYVIEW
where f.Order=="HERE"
select f.ColA

I get the correct results returned for the ColA

I know this must be a newbie question. Still learning…thanks in advance

  • 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-03T03:59:33+00:00Added an answer on June 3, 2026 at 3:59 am

    The reason is that EF by default needs to identify uniquely every record. Because of that every entity must have unique key. Views don’t have a key so EF infers the key by using all non-nullable columns which don’t contain binary data. Now EF expects that these columns will make the entity uniquely identifiable. If they don’t you will end with the problem you see in your first example. When EF reads entities from result set it check the key and if the entity with the same key was already created it uses that instance instead of creating a new one -> all records from the result set with the same values in key columns will be represented by the same entity instance. I described today how to avoid this problem with views.

    Your second example uses projection. In such case no entity instances are constructed and EF simply returns values.

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

Sidebar

Related Questions

Does anyone here use VB.NET and have a strong preference for or against using
I wanted to use SELECT ... WHERE LIKE query against my file's path (VARCHAR)
I currently have two almost identical SQL queries, which I use against my SQLITE3
I'm building a little search application (I know I can use match against). But
If I do a query (I plan to use SDS.P) against the global catalog,
Sam Ruby, author of RESTful Web Services seems to come out against the use
I can use the regex comparing a comma delimited list of GUID against a
I want to use git as a local repository against a remote SVN repository.
I am attempting to use Ant's XMLValidate task to validate an XML document against
What's the best strategy to use when writing JMeters tests against a web application

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.