An Enthusiastic Programmer

Fluent API Tutorial


Fluent API is a complementary approach that data annotation can’t do. the design pattern comes from Fluent API(a.k.a Fluent Interface). the actual implement mechanism comes from Method Chaining.

  1. Fluent API is another way to configure domain classes over the Code First Convention and Data Annotation.
  2. Fluent API is more flexible and provides developers more functionalities than Data Annotation.
  3. The priority of the Entity Framework processing is Fluent API > Data Annotation > Default Convention.
In this article: