Skip to content
pagebrooks edited this page Dec 7, 2011 · 4 revisions

The KeyType enum allows Dapper Extensions to know how to populate the primary key for your POCOs. The following KeyTypes are available:

public enum KeyType
{
    NotAKey,
    Identity,
    Guid,
    Assigned
}

NotAKey Any property that is not a primary key will be mapped with this enum value.

Identity Any primary key that is an Integer will be mapped with this enum value. This value instructs Dapper Extensions to allow the database to generate the next available Id.

Guid Any primary key that is an Guid will be mapped with this enum value. This value instructs Dapper Extensions to generate a new Guid for the POCO before database insertion. Dapper Extensions generates COMB Guids (see: GetNextGuid)

Clone this wiki locally