summaryM:DotNetNuke.Data.PetaPoco.FluentMapperExtensions.PrimaryKey``1(DotNetNuke.Data.PetaPoco.FluentMapper{``0},System.String,System.Boolean)

Namespace: DotNetNuke.Data.PetaPoco
Assembly: DotNetNuke (in DotNetNuke.dll)

Syntax

C#
public static FluentMapper<TModel> PrimaryKey<TModel>(
	this FluentMapper<TModel> mapper,
	string primaryKey,
	bool autoIncrement = true
)
Visual Basic
<ExtensionAttribute> 
Public Shared Function PrimaryKey(Of TModel) ( 
	mapper As FluentMapper(Of TModel),
	primaryKey As String,
	Optional autoIncrement As Boolean = true
) As FluentMapper(Of TModel)

Parameters

mapper
Type: DotNetNuke.Data.PetaPoco..::..FluentMapper<(Of <(<'TModel>)>)>
parammapperM:DotNetNuke.Data.PetaPoco.FluentMapperExtensions.PrimaryKey``1(DotNetNuke.Data.PetaPoco.FluentMapper{``0},System.String,System.Boolean)
primaryKey
Type: System..::..String
paramprimaryKeyM:DotNetNuke.Data.PetaPoco.FluentMapperExtensions.PrimaryKey``1(DotNetNuke.Data.PetaPoco.FluentMapper{``0},System.String,System.Boolean)
autoIncrement
Type: System..::..Boolean
paramautoIncrementM:DotNetNuke.Data.PetaPoco.FluentMapperExtensions.PrimaryKey``1(DotNetNuke.Data.PetaPoco.FluentMapper{``0},System.String,System.Boolean)

Type Parameters

TModel
typeparamTModelM:DotNetNuke.Data.PetaPoco.FluentMapperExtensions.PrimaryKey``1(DotNetNuke.Data.PetaPoco.FluentMapper{``0},System.String,System.Boolean)

Return Value

returnsM:DotNetNuke.Data.PetaPoco.FluentMapperExtensions.PrimaryKey``1(DotNetNuke.Data.PetaPoco.FluentMapper{``0},System.String,System.Boolean)

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type FluentMapper<(Of <(<'TModel>)>)>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [b8020aae-374d-46a9-bcb7-8cc2390b93b6] or [175ce3ff-9bbf-4e64-8421-faeb81a0bb51].

See Also