Skip to content

Fixes #57#63

Merged
jbogard merged 1 commit intoAutoMapper:masterfrom
kakone:bugfix#57
Oct 13, 2022
Merged

Fixes #57#63
jbogard merged 1 commit intoAutoMapper:masterfrom
kakone:bugfix#57

Conversation

@kakone
Copy link
Copy Markdown

@kakone kakone commented Mar 10, 2022

If the primary key doesn't exist on the DTO, we can receive an Object reference not set to an instance of an object exception because the GeneratePropertyMaps method can return a collection with a null value due to the .FirstOrDefault.

This PR also removes the unecessary <TDatabaseContext> type on GenerateEntityFrameworkCorePrimaryKeyPropertyMaps class.

@jbogard jbogard merged commit c9644a8 into AutoMapper:master Oct 13, 2022
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.

2 participants