Most applications use a database to store information. Most databases, however, store information in a way that does not exactly match up with server-side object oriented programming. This is a very common problem and has given rise to the field of Object Relational Mapping (ORM) systems. Many of these exist, but Microsoft has created one specific to the .NET framework known as the Entity Framework (EF). It is basically a framework designed to more easily write code that stores information in a database but still behaves like an object oriented system. If you have downloaded the sample content for this chapter, go ahead and open the Chapter 11
solution now to follow along. Otherwise, create a new ASP.NET MVC 4 project and choose the Web API template when asked.
The particulars of the Entity Framework are numerous and there is not enough space here to explore them. We will go through a basic example of how to utilize the Entity Framework Code...