Entity Framework-like Navigation Properties#19
Merged
Conversation
Re-worked the process of retrieving navigation properties, now also can also pick up collections. Added serialization support for navigation property collections. Bug fix to DbEntityWriter (with the new database parameter for mutation) New LINQ extension for searching by Ids without knowing the ID property name
And you know, actually writing part of the mutator that I thought I wrote earlier
Codecov Report
@@ Coverage Diff @@
## master #19 +/- ##
==========================================
+ Coverage 90.29% 93.16% +2.87%
==========================================
Files 41 50 +9
Lines 1133 1609 +476
==========================================
+ Hits 1023 1499 +476
Misses 110 110
Continue to review full report at Codecov.
|
Yeah, its a hack but it does the job for now.
Code does need a good cleanup! - Couldn't handle deserializing null values (as expected) - Caused an exception in the MongoDB driver due to not implementing the generic interface - Serializing back and forth lost data
Removing bits of code that are redundant or now irrelevant
Removed if-condition and removed additional serialization step
Also moves logic for persisting ids from the serializer to the collection (not 100% sure if I am happy with this part though)
Biggest difference is that it no longer supports updates to related entities (though still supports creation when applicable). EntityNavigationCollection supports lazy loading and allows smarter serialization. Entity relationship collection serialization now supports any ICollection, not just EntityNavigationCollection specific (eg. property can be initialized with List<TEntity>)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See #12