Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed missing check for explicit key in Contrib GetaAync() #382

Merged
merged 1 commit into from Nov 22, 2015
Merged

Fixed missing check for explicit key in Contrib GetaAync() #382

merged 1 commit into from Nov 22, 2015

Conversation

johandanforth
Copy link
Contributor

No description provided.

if (!keys.Any())
throw new DataException("Get<T> only supports en entity with a [Key] property");
var explicitKeys = ExplicitKeyPropertiesCache(type);
if (keys.Count() > 1 || explicitKeys.Count() > 1)
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be if (keys.Count() + explicitKeys.Count() > 1)?

@NickCraver
Copy link
Member

Pulling this in as it fixes the one breaking test - I wan to revisit how explicit keys are implemented in general though - we can be much more DRY here with attribute inheritance I think.

NickCraver added a commit that referenced this pull request Nov 22, 2015
Fixed missing check for explicit key in Contrib GetaAync()
@NickCraver NickCraver merged commit 89d4408 into DapperLib:master Nov 22, 2015
@johandanforth
Copy link
Contributor Author

👍

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.

None yet

2 participants