In this chapter, you are going to learn about how you can use Data Annotations to further constrain your database structures from code. In addition, you’ll look at how you can easily build out some relationships in your models that translate directly into relationships in the database.
When you’ve finished with this chapter, you’ll have the ability to correctly create entities that not only specify type but have further constraints like primary and secondary keys and limiting the length on strings. ...