[Suggestion] Abp.GraphDiff package
See original GitHub issueHello @hikalkan ,
What do you think about creating Abp.GraphDiff
package, which would allow to attach a detached entities/graphs to a context?
I’m currently using GraphDiff in combination with OData and it works like a charm because updating of navigation properties are handled by GraphDiff. Let me know if you are open to such contribution and If you want I will spend some spare time to prepare an integration package, which includes the things, which are needed to make GraphDiff work out-of-the-box:
- Some entity mapping storage for saving all of the mappings with a convenient API.
- Custom pre-build repository which Adds/Updates entities as a whole graphs via GraphDiff.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:30 (26 by maintainers)
Top Results From Across the Web
Abp.EntityFramework.GraphDiff 8.3.1
Version Downloads Last updated
8.3.1 43 6 days ago
8.3.0 40 6 days ago
8.2.0 133 3 months ago
Read more >Entity Update issue with sub-entity #2501
Support Team. Hi,. As far as I know Entity Framework is not very good at sub entity updates. ABP has a package named...
Read more >Simple index
... wix-protos-partners-partners-site-connect menpocli leodatacenter-package ... odoo12-addon-sale-order-product-recommendation-secondary-unit django-xtc ...
Read more >sitemap_package_4.xml
Recommendation 2023-08-14 https://nugetmusthaves.com/package/Crosslight.Xamarin.Android.Support.Vector.
Read more >2m-subdomains.txt
... parquet-pig tdb Abp WaveEngine donomo mockery slidify elm-package pre-public ... centos-postgres ExperimentalTools suggestions TransportsBordeaux vundle ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@maharatha , You can check out sample application, which is used in unit tests, to find out how it works.
Here is the little guide:
YourCompany.EntityFramework
project and add a dependency on this package intoEntityFrameworkModule.cs
usingDependsOn
annotation. Example.2*. You should use the extension
MappingExpressionBuilder.For<TEntity>(configuration => ...)
to create new mappings.2**. You can find more about mappings syntax here. You use
AssociatedCollection()
orAssociatedEntity()
to map a navigation property, but if you want to make a “deeper” mapping you firstly use theOwnedCollection()
orOwnedEntity()
methods.AttachGraph()
extension. This method uses the mapping configuration, which was set up in step 2. In a case, you didn’t provide any mapping, it will simply usenull
mapping, which means that mapping weren’t provided (it’s default GraphDiff value for mapping). Example1, Example2.That’s it: only 3 steps to handle the detached graph attachment in EF6 using Abp. Let me know if you have any further questions or you still need a sample project.
AbpZeroEntityFrameworkModule is module for EF6 and it’s correct to depend on it if you are using EF6. AbpEntityFrameworkCoreModule is module for EF Core. GraphDiff integration depends on EF6 and it’s the only EntityFramework module you can reference. You neither can nor should try to use GraphDiff with EF Core hence it’s functionality is already present in EF Core out of the box.
You must have it to resolve GraphDiff extension methods; otherwise, you will have that exact issue you’ve described in your previous message. Add the reference to EntityFramework from your Application Project, build solution, enjoy using GraphDiff.
AutoMapper is not related to the issue for sure and your module dependencies are correct.