PM> Add-Migration Recipe_NameAndComplexityScaffolding migration ‘Recipe_NameAndComplexity’.
The Designer Code for this migration file includes a snapshot of your current Code First model. This snapshot is used to calculate the changes to your model when you scaffold the next migration. If you make additional changes to your model that you want to include in this migration, then you can re-scaffold it by running ‘Add-Migration Recipe_NameAndComplexity’ again.

I have already a recipe in the database, after executing the migration I would like to have this recipe with the default value…

If I try to run Update-Database the database I have this error:

Column ‘Name’ in table ‘dbo.Recipes’ is of a type that is invalid for use as a key column in an index.

After investigating the problem I found something… I wanted to create an Index from a string without MaxLength and an Index can have a size up to 900 bytes… I will add a MaxLength to my Recipe Name column: