Skip to content

Commit

Permalink
Add missing comma
Browse files Browse the repository at this point in the history
  • Loading branch information
scottaddie authored Sep 5, 2017
1 parent 7917119 commit b8b5f6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aspnetcore/data/ef-mvc/complex-data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
}
```

In this tutorial you're using the fluent API only for database mapping that you can't do with attributes. However, you can also use the fluent API to specify most of the formatting, validation, and mapping rules that you can do by using attributes. Some attributes such as `MinimumLength` can't be applied with the fluent API. As mentioned previously, `MinimumLength` doesn't change the schema, it only applies a client and server side validation rule.
In this tutorial, you're using the fluent API only for database mapping that you can't do with attributes. However, you can also use the fluent API to specify most of the formatting, validation, and mapping rules that you can do by using attributes. Some attributes such as `MinimumLength` can't be applied with the fluent API. As mentioned previously, `MinimumLength` doesn't change the schema, it only applies a client and server side validation rule.

Some developers prefer to use the fluent API exclusively so that they can keep their entity classes "clean." You can mix attributes and fluent API if you want, and there are a few customizations that can only be done by using fluent API, but in general the recommended practice is to choose one of these two approaches and use that consistently as much as possible. If you do use both, note that wherever there is a conflict, Fluent API overrides attributes.

Expand Down

0 comments on commit b8b5f6e

Please sign in to comment.