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.
精彩评论