In PetaPoco, how to decorate a table that has multi-columns primary keys

后端 未结 1 1156
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-02 15:23

In the example given on PetaPoco\'s web site, this is how to decorate a class:

[PetaPoco.TableName(\"articles\")]
[PetaPoco.PrimaryKey(\"article_id\")]
publi         


        
1条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-02 15:56

    This currently only works in my branch, but you can do this.

    [PetaPoco.PrimaryKey("article_id,title")]
    

    My branch can be found here. https://github.com/schotime/PetaPoco

    0 讨论(0)
提交回复
热议问题