Skip to content

ComparerAttribute class

namespace: Serenity.Data   assembly: Serenity.Net.Services

Specifies the comparer used to compare the values of a row's fields (for example, for change detection or dirty tracking). Can be applied to a row class to affect all of its fields, or to a single field property to override the row, connection or global setting.

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property)]
public class ComparerAttribute : Attribute

Public Members

name description
ComparerAttribute(…) Initializes a new instance using a StringComparison value. (3 constructors)
CaseInsensitive { get; } Gets a value indicating whether to compare case-insensitively.
Comparison { get; } Gets the string comparison, if specified.
Culture { get; } Gets the culture name, if specified.
ToStringComparer() Creates the StringComparer represented by this attribute.

See Also