O'Reilly logo

Code-First Development with Entity Framework by Sergey Barskiy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

We covered a lot of ground in this chapter. Since practice makes perfect, I always recommend that everyone tries out the covered concepts by writing code and experimenting. We looked at some new modeling techniques. We saw that we can create additional classes, called complex types, to group properties common to multiple entities to ensure consistency in our models. We saw that using enumerations in models can lead to more readable code, and were convinced that Entity Framework has first-class support for enumerations. We saw that we do not have to have the names of our classes and properties match database structure exactly. We could use the HasColumnName and ToTable methods to provide alterative names at the database level.

We looked ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required