开发者

Fluent nHibernate AutoMapping & ID Generation Scheme

How can I use Fluent NHibernate (with AutoMappin开发者_高级运维g) to configure the default ID generation scheme to Guid.Comb? I can see that I could specify in each entity (or a base class) the following code:

Id(entity => entity.Id, "Id").GuidComb();

Which is fine. However this doesn't so much seem to be setting the default behavior as overriding it. I just want to know if I am missing a configuration trick.

Thanks for any help


you should use conventions.
this way you can define default behaviour which would be applied to all your classes (or conditionally, if needed).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜