Our last step – regardless of whether we use a POCO or
tool-generated Person class – will be to save our valid friends into the database.
Doing that simply requires us to replace the “Todo”
placeholder statement within our FriendsController class with 3 lines of code
that saves the new friend to a database. Below is the complete code for
the entire FriendsController class - when using ADO.NET EF to do the database
persistence for us:

And now when we visit the /Friends/Create URL we can easily
add new People to our friends database:

Validation for all the data is enforced on both the client
and server. We can easily add/modify/delete validation rules in one
place, and have those rules be enforced by all controllers and views across our
application.