• Complain

Julia Lerman - Programming Entity Framework: Code First

Here you can read online Julia Lerman - Programming Entity Framework: Code First full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2011, publisher: OReilly Media, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

No cover
  • Book:
    Programming Entity Framework: Code First
  • Author:
  • Publisher:
    OReilly Media
  • Genre:
  • Year:
    2011
  • Rating:
    4 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 80
    • 1
    • 2
    • 3
    • 4
    • 5

Programming Entity Framework: Code First: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Programming Entity Framework: Code First" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Take advantage of the Code First data modeling approach in ADO.NET Entity Framework, and learn how to build and configure a model based on existing classes in your business domain. With this concise book, youll work hands-on with examples to learn how Code First can create an in-memory model and database by default, and how you can exert more control over the model through further configuration.Code First provides an alternative to the database first and model first approaches to the Entity Data Model. Learn the benefits of defining your model with code, whether youre working with an existing database or building one from scratch. If you work with Visual Studio and understand database management basics, this book is for you.Learn exactly what Code First doesand does notenable you to do Understand how property attributes, relationships, and database mappings are inferred from your classes by Code First Use Data Annotations and the Fluent API to configure the Code First data model Perform advanced techniques, such as controlling the database schema and overriding the default model caching This book is a continuation of author Julia Lermans Programming Entity Framework, widely recognized as the leading book on the topic.

Julia Lerman: author's other books


Who wrote Programming Entity Framework: Code First? Find out the surname, the name of the author of the book and a list of all author's works by series.

Programming Entity Framework: Code First — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Programming Entity Framework: Code First" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Programming Entity Framework: Code First
Julia Lerman
Rowan Miller
Editor
Meghan Blanchette
Editor
Laurel Ruma

Copyright 2011 Julia Lerman, Rowan Miller

OReilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (.

Nutshell Handbook, the Nutshell Handbook logo, and the OReilly logo are registered trademarks of OReilly Media, Inc. Programming Entity Framework: Code First , the image of a common bittern, and related trade dress are trademarks of OReilly Media, Inc.

Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and OReilly Media, Inc., was aware of a trademark claim, the designations have been printed in caps or initial caps.

While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.

OReilly Media Preface Microsofts principal data access technology ADONET - photo 1

O'Reilly Media

Preface

Microsofts principal data access technology, ADO.NET Entity Framework, has had two major releases as part of the .NET Framework. NET 3.5 brought us the first version of Entity Framework, which is covered in the first edition of Programming Entity Framework . In 2010, Microsoft .NET 4 was released; it contained the next version of Entity Framework, referred to as Entity Framework 4. The completely revised second edition of Programming Entity Framework was dedicated to teaching readers how to use this version of Entity Framework in Visual Studio 2010.

When .NET 4 was released, the Entity Framework team was already hard at work on a new addition, called Code First, to provide an alternative to building the Entity Data Model that is core to Entity Framework. Rather than using a visual designer, Code First allows you to create the model from your existing classes.

This book is dedicated to teaching readers how to use Code First to build and configure a model based on the classes in your business domain. While Code First can do much of the job of inferring a model from your classes, there is quite a lot that you can do to affect the model that Code First creates.

In this book, you will learn what Code First does by default (aka convention) and how to perform further configuration to affect how it understands your properties, classes, relationships, and the database schema they map towhether you use Code First to help create a database or you want to use it with an existing database. With this knowledge, you can reap the benefits of the Entity Framework while leveraging existing classes or those classes you might be building for a new software project.

Audience

This book is designed for .NET developers who have experience with Visual Studio and database management basics. Prior experience with Entity Framework is beneficial but not required. The code samples in this book are written in C#, with some of these samples also expressed in Visual Basic. There are a number of online tools that you can use to convert snippets of C# into Visual Basic.

Contents of This Book

This book contains eight chapters.

  • This chapter provides a high level, end-to-end overview of Code First. Youll find sample code, but there are no walkthroughs in this first chapter. The chapter winds up with a discussion of what you wont find in Code First, so that you can approach the technology with the correct expectations.

  • In this chapter, you will get to jump right in to the code. The chapter gives you a chance to work hands-on with Code First (or just read along if you prefer) as you work with a simple class to see some of the basic default behavior and perform some simple configurations using the two mechanisms for configuring: Data Annotations and the Fluent API. Youll see how Code First is able to automatically create a database for you using default behavior. Through the next four chapters youll lean on this database creation default, and then in , youll learn how to work with existing databases and exert more control over the database.

  • This is the first of three chapters that dive deeply into Code First convention and configuration. Youll learn about the presumptions the Code First convention makes about the attributes of properties (e.g., the length of strings) and how that gets interpreted into the conceptual model and the database. Youll also learn how to perform configuration using Data Annotations and Fluent API to control the outcome of the model and database.

  • In this chapter, youll focus on relationships between your classes and how those work out in the model that Code First infers and in the database. Code First convention is able to infer the most common scenarios when classes have relationships between them. Well look closely at the nuances in your classes that will drive Code Firsts assumptions and then how to ensure that Code First knows exactly what you want it to do, again by configuring with Data Annotations or the Fluent API.

  • This chapter focuses on how classes map to the database. This information will be especially important when you are mapping your classes to an existing database. Simple mappings, such as specifying table names or column names and types, can make a huge difference. Youll learn about the default mappings to the database when you have inheritance hierarchies defined between your classes and how to drive Table Per Hierarchy, Table Per Type and even Table Per Concrete Type mappings to the database. Youll also learn how to map a single entity to multiple tables or, conversely, multiple entities to a single table.

  • This chapter is where you finally get to stray from the default database creation behavior. Youll learn how to control Code Firsts determination of the database name and location, whether you do this through connection strings or some lower-level code in the Code First API. Youll also find some additional tricks for controlling connections and more.

  • In this chapter, youll dig farther into Code First to see how to perform some advanced techniques. Youll see how to prevent Code First from worrying about keeping the database in sync with your model when you want to take over control of that task. Youll also learn about the default model caching and how to override it to solve problems like targeting multiple database providers in the same application instance. Other advanced topics are addressed as well.

  • This book was written about the features of Code First based on the Entity Framework 4.2 release. At the time of this writing, a number of Community Technical Previews demonstrate some of the features that Code First will gain in upcoming releases. This chapter shares available information about these future releases.

Conventions Used in This Book

The following typographical conventions are used in this book:

Italic

Indicates new terms, URLs, email addresses, filenames, and file extensions.

Constant width

Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Programming Entity Framework: Code First»

Look at similar books to Programming Entity Framework: Code First. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Programming Entity Framework: Code First»

Discussion, reviews of the book Programming Entity Framework: Code First and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.