artiomchi / FlexLabs.Upsert

FlexLabs.Upsert is a library that brings UPSERT functionality to common database providers for Entity Framework in their respective native SQL syntax
MIT License
516 stars 81 forks source link

Use DBSet.EntityType when possible #133

Closed quentez closed 1 year ago

quentez commented 1 year ago

When using shared-type entity types, FindEntityType() returns null even though the entity type exists. This made it impossible to use the library in combination with any of these.

Fortunately, when a DBSet is provided, we can access the entity type directly instead of having to find it on the context.

Let me know if you'd like more factorization to avoid some of the duplicated code.

artiomchi commented 1 year ago

Looks good to me! Adding a small change to how the collections are handled (using the new switch statement) before the merge while I'm here :)

quentez commented 1 year ago

@artiomchi Ohh nice job on the switch there, haven't had much time to play with it yet but it looks neat! And thank you for the merge 🙇‍♂️

artiomchi commented 1 year ago

Deployed the build to NuGet under 6.0.2!

quentez commented 1 year ago

Amazing, thank you 🙇‍♂️