Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello,
Is it possible to create combined primary keys with PetaPoco?
[TableName("slVisitors")] [PrimaryKey("EventId,MemberId", autoIncrement=false)] [ExplicitColumns] [DataContract(Name = "visitor", Namespace = "")] public class Visitor { [Column("EventId")] [PrimaryKeyColumn(AutoIncrement = false, Clustered = true)] [DataMember(Name = "eventid")] public int EventId { get; set; } [Column("MemberId")] [PrimaryKeyColumn(AutoIncrement = false, Clustered = true)] [DataMember(Name = "memberid")] public int MemberId { get; set; } }
This only creates a primary key for the first column. Thanks!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Combined primary keys with petapoco
Hello,
Is it possible to create combined primary keys with PetaPoco?
This only creates a primary key for the first column. Thanks!
is working on a reply...