OpenRIAServices / OpenRiaServices

The Open RIA Services project continues what was previously known as WCF RIA Services.
https://openriaservices.gitbook.io/openriaservices/
Apache License 2.0
54 stars 47 forks source link

Speed up ValidateProperty #453

Closed Daniel-Svensson closed 8 months ago

Daniel-Svensson commented 8 months ago

Speeds up setting entity properties which does not have any validation attributes on them, by not performing data validation.

Daniel-Svensson commented 8 months ago

Related to https://github.com/OpenRIAServices/OpenRiaServices/discussions/450

Daniel-Svensson commented 8 months ago

Fyi @SandstromErik the validateproperty method calls validator validateproperty which only checks attributes on the property so it should be safe. BUT the validateproperty method is virtual so it will be changed behaviour if somebody has overridden it and expects it to always be called if any field requires validation. (Need to remember adding it to changelog as behavior change before new release)

https://github.com/Daniel-Svensson/OpenRiaServices/blob/32494c312056e3aac9b6a3186608a6871341bb3f/src/OpenRiaServices.Client/Framework/Entity.cs#L1339C12-L1339C12