Chapter 2. Getting started with Entity Framework

 

This chapter covers

  • Introducing the book’s example application
  • Database-first and model-first design
  • Introducing the Visual Studio Entity Framework designer
  • An overview of Entity Framework’s capabilities

Now that you have a good idea of what Entity Framework is and why it might be useful, it’s time to start digging into it. In this chapter, we won’t go deep into the technology; what we’re going to look at is how to create an application from scratch and how to perform basic tasks, so you’ll get a feel for the power of Entity Framework. The walkthrough in this chapter will also help you get started creating any kind of application you’ll need to write on the job.

This chapter has three main parts. First, we’ll look at the example that runs through this book in terms of both the model and the database, and we’ll explain why we took certain approaches. Then we’ll look at how to use the designer to create the classes (the entities) and have it automatically generate the code. At the end of the chapter, the code will finally make its appearance. You’ll learn how to create a basic application that reads data and updates it in the database.

By the end of this chapter, you’ll be able to create an application from the ground up and perform basic operations on data. You’ll discover why in chapter 1 we said that productivity is one of the winning points of Entity Framework.

2.1. Introducing the OrderIT example

2.2. Designing the OrderIT model and database

2.3. Structuring the application

2.4. A sneak peek at the code

2.5. Summary

sitemap