Fluent Mapping or Data Annotations?

2

I was watching a video lesson on ASP.NET MVC, when I see the Fluent Mapping of the Entity Framework for the first time.

Soon I came to doubt.

Which of the two is best recommended? Fluent Mapping or Data Annotations ?

I really liked Fluent Mapping because I can play the validations for a separate class keeping my class clean, but Data Annotations has [Display(Name"")] / p>

Is it possible to merge the two?

    
asked by anonymous 30.09.2014 / 03:50

1 answer

2
  

Which of the two is best recommended? Fluent Mapping or Data Annotations ?

There is no "best recommended" here. They are complementary, having several functions in common. Each one is used according to your need.

The decor by attributes (which you called Data Annotations , which is actually

30.09.2014 / 04:08