开发者

Entity Framework 4.1:is it preferred to annotate properties or to use Fluent API

As the title implies: what are the pros and cons using Annotations in开发者_如何学Pythonstead of the Fluent API (or reversed)?


If you are purist you will not use Data Annotations because they make your POCO class little bit dirty. Also data annotations are only for simple mapping features. If you need more complex mapping you have to use fluent API anyway. Final choice for basic mapping is subjective.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜