1. Trang chủ
  2. » Công Nghệ Thông Tin

Programming Entity Framework: Code First ppt

192 2,1K 4

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 192
Dung lượng 5,94 MB

Nội dung

[...]... Database First workflow, you reverse engineer from a database and then let a code generator create the classes The Code First workflow begins with you coding your classes and then optionally letting Code First create a database for you Getting Code First to Developers in Between NET Releases Code First was not ready in time to be released in NET 4 Rather than waiting for the NET 5 release to bring Code First. .. type of modeling is called Code First Code First lets you define your domain model with code rather than using an XML-based EDMX file Even though Model First and Database First use code generation to provide classes for you to work with, many developers simply did not want to work with a designer nor have their classes generated for them They just wanted to write code In Code First you begin by defining... you choose to go with a designer or to use the code- based modeling is entirely your decision Figure 1-1 lays out the different options you have for modeling with Entity Framework 2 | Chapter 1: Welcome to Code First Figure 1-1 Modeling workflow options Microsoft refers to the Database First, Model First, and Code First options as workflows (e.g., the Code First workflow) That’s because each of those... updates to the Entity Framework NuGet package Writing the Code First Code First is aptly named: the code comes first, the rest follows Let’s take a look at the basic default functionality without worrying about all of the possible scenarios you might need to support The rest of the book is dedicated to that We don’t expect you to recreate the sample code shown in this first chapter The code samples are... First to developers, Microsoft made Code First available in an out-of-band release, referred to as Entity Framework 4.1, in April 2011 The version number will increment as subsequent updates are released Entity Framework 4.2 was released in October 2011 and replaces Entity Framework 4.1 as the release that included Code First The core Entity Framework API, System.Data .Entity. dll, is still part of the... classes One of the big advantages of Code First is that your classes become the model This means any changes to the model only need to be made in one place—your POCO classes Code First, Database First, and Model First are all just ways of building an Entity Data Model that can be used with Entity Framework to perform data access Once the model has been built, the Entity Framework runtime behaves the... structure that Entity Framework should expect in the database when you have classes that inherit from each other This could be very limiting if Code First relied solely on convention to work with your classes But Code First is not determined to force you to design your classes to meet its needs Instead, the conventions exist to enable Code First to automatically handle some Writing the Code First | 5 common... a look at “Reverse Engineer Code First on page 173 (Chapter 8) What Code First Does Not Support Code First is a relatively new addition to Entity Framework and there are a few features that it currently does not support The EF team has indicated that they plan to add support for most of these in future releases Database migrations At the time of writing this book, Code First does not yet support database... provider–independent Code First does not support either of these features yet Multiple Entity Sets per Type (MEST) Code First does not support the Multiple Entity Sets per Type (MEST) feature MEST allows you to use the same class in two different sets that map to two different tables This is a more obscure Entity Framework feature that is rarely used The EF team has said that, in an effort to keep the Code First. .. business model of Programming Entity Framework, software applications built for a company called Break Away Geek Adventures Look for a second short book titled Programming Entity Framework: DbContext, which will focus on DbContext, DbSet, Validation API, and using the features that are also part of the Entity Framework NuGet package Learning from This Book | 15 CHAPTER 2 Your First Look at Code First If you’ve . Programming Entity Framework: Code First Julia Lerman and Rowan Miller Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo Programming Entity Framework:. . . . 171 Code First Migrations 171 Entity Framework Power Tools 173 Reverse Engineer Code First 173 Viewing a Code First Model 174 Optimize Entity Data

Ngày đăng: 23/03/2014, 02:20

TỪ KHÓA LIÊN QUAN

w