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 you’re 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 does—and does not—enable you to doUnderstand how property attributes, relationships, and database mappings are inferred from your classes by Code FirstUse Data Annotations and the Fluent API to configure the Code First data modelPerform advanced techniques, such as controlling the database schema and overriding the default model caching
This book is a continuation of author Julia Lerman’s Programming Entity Framework, widely recognized as the leading book on the topic.
With DbContext, you’ll be able to query and update data, whether you’re working with individual objects or graphs of objects and their related data. You’ll find numerous C# code samples to help you get started. All you need is experience with Visual Studio and database management basics.Use EF’s query capabilities to retrieve data, and use LINQ to sort and filter dataLearn how to add new data, and change and delete existing dataUse the Change Tracker API to access information EF keeps about the state of entity instancesControl change tracking information of entities in disconnected scenarios, including NTier applicationsValidate data changes before they’re sent to the database, and set up validation rulesBypass EF’s query pipeline and interact directly with the database
From the Entity Data Model (EDM) and Object Services to EntityClient and the Metadata Workspace, this highly acclaimed first edition covers it all.Understand the core concepts you need to make the best use of the Entity Framework (EF) in your applicationsLearn to query your data, using either LINQ to Entities or Entity SQLCreate Windows Forms, WPF, and ASP.NET applicationsBuild ASMX web services and WCF servicesUse Object Services to work directly with your entity objectsDelve into model customization, relationship management, change tracking, data concurrency, and more
One important note: while many of the lessons from this book will continue to be valuable as you move to .NET 4, the thoroughly revised second edition of Programming Entity Framework (August 2010) specifically targets Visual Studio 2010 and .NET 4 -- where there have been many advancements and additions to the framework.
Written by Julia Lerman, the leading independent authority on the framework, Programming Entity Framework covers it all -- from the Entity Data Model and Object Services to WCF Services, MVC Apps, and unit testing. This book highlights important changes for experienced developers familiar with the earlier version.Understand the core concepts you need to make the best use of the EF4 in your applicationsLearn to query your data, using either LINQ to Entities or Entity SQLCreate Windows Forms, WPF, ASP.NET Web Forms, and ASP.NET MVC applicationsBuild and consume WCF Services, WCF Data Services, and WCF RIA ServicesUse Object Services to work directly with your entity objectsCreate persistent ignorant entities, repositories, and write unit testsDelve into model customization, relationship management, change tracking, data concurrency, and moreGet scores of reusable examples -- written in C# (with notes on Visual Basic syntax) -- that you can implement right away