Length property

Provides automatic truncation of strings when persisting objects to the database.

Namespace: ReFlex.Data namespace
Assembly: ReFlex.Data.dll

Syntax

public int Length = 0;

Remarks

Default of 0 is unlimited.

Examples

// FirstName and LastName will be automatically truncated to 50 characters
// to avoid field overflow errors when persisting to the database
public class Contact
{
    public int ContactID;

    [RelationalMemberInfo(Length = 50)]
    public string FirstName;

    [RelationalMemberInfo(Length = 50)]
    public string LastName;
}