Skip to content

Conversation

ajcvickers
Copy link
Contributor

Issue #797

Semantics are essentially the same as EF6:

  • If entity with given key is being tracked, then return it without a database query
  • Otherwise, query the database and track and return entity if found
  • Otherwise, return null

@@ -0,0 +1,312 @@
// Copyright (c) .NET Foundation. All rights reserved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't verify the SQL here unless there is a meaningful difference from SQL Server. We removed this type of verification because it added a significant maintenance burden to query.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's also a way of ensuring that the database has/has not been hit. Okay if I change it to empty string verses not empty string?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't you already getting that verification by using Assert.Same?

@anpete
Copy link
Contributor

anpete commented Jun 16, 2016

:shipit:

Issue #797

Semantics are essentially the same as EF6:
- If entity with given key is being tracked, then return it without a database query
- Otherwise, query the database and track and return entity if found
- Otherwise, return null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants