LosManos/ST4bbyByMe — Issue #11: Can only handle int as PK
Author: LosManos
Created: 2012-02-17 22:54:39+00:00
State: open

It can only handle int as primary key in the Create method. See the code

var ctx = MakeConnectionAndTransaction();
ctx.Conn.Execute(
"insert into VerifyParty ( UID, NuggetWord, ActiveDiggerEmailaddress, OtherDiggerEmailaddress, StatusID ) values( @UID, @NuggetWord, @ActiveDiggerEmailaddress, @OtherDiggerEmailaddress, @StatusID )",
new { UID = UID, NuggetWord = NuggetWord, ActiveDiggerEmailaddress = ActiveDiggerEmailaddress, OtherDiggerEmailaddress = OtherDiggerEmailaddress, StatusID = StatusID},
ctx.Trans
);
var res = ctx.Conn.Query<**int**>(
"select **cast( @@identity as int)**",
ctx.Trans
);
return **(int)**res.Single();