如何设置自增的主键?

5 views
Skip to first unread message

Richardz Richardz

unread,
Dec 5, 2006, 11:02:37 PM12/5/06
to NBear Google Group
请问如何在NBear中如何设置自增的主键?

Teddy

unread,
Dec 5, 2006, 11:04:52 PM12/5/06
to nbear...@googlegroups.com
如下定义就可以了,定义只读的int或long的主键,将自动映射为自增长字段:
 
[PrimaryKey]
int ID { get; }

Teddy
 
On 12/6/06, Richardz Richardz <Richar...@gmail.com> wrote:
请问如何在NBear中如何设置自增的主键?

Reply all
Reply to author
Forward
0 new messages