【发布时间】:2011-11-07 16:23:48
【问题描述】:
在 PetaPoco 网站上给出的示例中,这是装饰类的方法:
[PetaPoco.TableName("articles")]
[PetaPoco.PrimaryKey("article_id")]
public class article
{
public long article_id { get; set; }
public string title { get; set; }
public DateTime date_created { get; set; }
public bool draft { get; set; }
public string content { get; set; }
}
但假设文章表被建模为有 2 列:article_id 和 title 作为其主键(而不仅仅是 article_id),那么 PetaPoco 中的装饰会是什么样子。
【问题讨论】:
标签: petapoco