Update new-field.md (#2417)

pull/2420/head
Rick Anderson 2016-12-16 20:53:51 -10:00 committed by GitHub
parent 443f0680e2
commit e83e5cc0ea
1 changed files with 2 additions and 0 deletions

View File

@ -14,6 +14,8 @@ uid: tutorials/first-mvc-app/new-field
---
# Adding a New Field
By [Rick Anderson](https://twitter.com/RickAndMSFT)
In this section you'll use [Entity Framework](http://docs.efproject.net/en/latest/platforms/aspnetcore/new-db.html) Code First Migrations to add a new field to the model and migrate that change to the database.
When you use EF Code First to automatically create a database, Code First adds a table to the database to help track whether the schema of the database is in sync with the model classes it was generated from. If they aren't in sync, EF throws an exception. This makes it easier to track down issues at development time that you might otherwise only find (by obscure errors) at run time.