AbpHelper.CLI
AbpHelper.CLI copied to clipboard
Synchronizer class generator
Synchronizer Class Generator
It generates a local entity data synchronizer class on the same path with the target entity class.
Usage
Command
abphelper generate synchronizer [options] <LocalEntityName> <TargetEntityOrEtoFullName>
Options
--distributed-events
Handle the distributed events instead of local events.
--ignore-update
Do not synchronize the data when the target entity is updated.
--ignore-delete
Do not delete the local entity when the target entity is deleted.
Samples
abphelper generate synchronizer Product EasyAbp.EShop.Payments.Payment
abphelper generate synchronizer --distributed-events Product EasyAbp.EShop.Payments.Etos.PaymentEto
Generation Steps
It is not easy to update the related entities of an aggregate root, we should ignore mapping the related entities since it will cover the original entities. (Maybe there are some better ways?)
See: https://github.com/EasyAbp/EShop/blob/dev/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Payments/PaymentSynchronizer.cs https://github.com/EasyAbp/EShop/blob/dev/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/PaymentsDomainAutoMapperProfile.cs
Should ignore mapping the ConcurrencyStamp
property.