Using ASP.NET Web API 1 with Entity Framework 5

How to create a Web API 1 application that uses Entity Framework for database persistence.