Table of Contents

Class IdentityGenerator

Namespace
eQuantic.Core.Data
Assembly
eQuantic.Core.Data.dll

Generates identity values, such as sequential GUIDs suitable for use as database primary keys.

public static class IdentityGenerator
Inheritance
IdentityGenerator
Inherited Members

Fields

GuidRegex

A regular expression that matches a GUID, with or without surrounding braces.

public const string GuidRegex = "^(\\{){0,1}[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}(\\}){0,1}$"

Field Value

string

Methods

NewSequentialGuid()

Generates a sequential GUID across system boundaries, minimizing index fragmentation and making it ideal for use as a database key.

public static Guid NewSequentialGuid()

Returns

Guid

A newly generated sequential Guid.