UniqueConstraintAttribute class

namespace: Serenity.Data.Mapping   assemblySerenity.Net.Data

Adds a unique constraint check to the row.

[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public class UniqueConstraintAttribute : Attribute

Public Members

name description
UniqueConstraintAttribute(…) Initializes a new instance of the UniqueConstraintAttribute class.
CheckBeforeSave { get; set; } Gets or sets a value indicating whether constraint should be checked before save, default true.
ErrorMessage { get; set; } Gets or sets the error message.
Fields { get; } Gets the fields.
IgnoreDeleted { get; set; } Gets or sets a value indicating whether to ignore deleted records while checking the constraint.
Name { get; set; } Gets or sets the constraint name. Not used at the moment.

See Also