Task list

Image

In this chapter we’ll explore the last of the three workflows that the Entity Framework supports: Code First.

Code first basics

Image

A basic model using the Code First Workflow is much simpler to implement than the Designer-based workflows, so we’ll start by building one.

Code first conventions

Image

The simplest way to set up Entity Framework using the Code First Workflow is to let it make assumptions based on the structure of your classes and their field names. The conventions are straightforward, and this approach will often work for you just fine, so we’ll start by exploring this method.

Controlling the database

Image

Although the conventions work well in most situations, there are times the default behavior won’t suit you. We’ll explore controlling the database schema in the next chapter, but one of the first things you’ll probably want to take control of is when and where the database gets created. We’ll explore some techniques for doing that at the end of this chapter.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset