Closed nkovacic closed 2 years ago
No. If you want to make something that will generate equality based off some convention you can look into LinqToSQL and EF extensions. there's an equality method generator interface that you can use to make your own comparisons if need be. Like match any public properties that have Id and match name or just Id.
I am assuming that you have to make an custom IGeneratePropertyMaps like the AutoMapper.Collection.EFCore does with GenerateEntityFrameworkCorePrimaryKeyPropertyMaps. Are there any examples for this?
There are no custom examples. You can look at GenerateEntityFrameworkCorePrimaryKeyPropertyMaps source code and see how it works there. It uses reflection from the DBContext to get the Primary Keys and then returns property maps that use said keys.
Is a non-generic version of EqualityComparison supported?