Table of Contents

Method SetPropertyAndValidate

Namespace
Innova.Data.Entity
Assembly
Innova.Data.dll

SetPropertyAndValidate<T>(ref T, T, string)

Sets the value of a property and validates it.

protected virtual bool SetPropertyAndValidate<T>(ref T storage, T value, string propertyName = null)

Parameters

storage T

The reference to the backing field of the property.

value T

The new value of the property.

propertyName string

The name of the property. This is optional and will be automatically set by the compiler if not provided.

Returns

bool

true if the property value has changed; otherwise, false.

Type Parameters

T

The type of the property.