The DbContext API captures Entity Framework’s (EF) most commonly used features and tasks, simplifying development with EF. This concise book shows you how to use the API to perform set operations with the DbSet class, handle change tracking and resolve concurrency conflicts with the Change Tracker API, and validate changes to your data with the Validation API. 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 data Learn how to add new data, and change and delete existing data Use the Change Tracker API to access information EF keeps about the state of entity instances Control change tracking information of entities in disconnected scenarios, including NTier applications Validate data changes before they’re sent to the database, and set up validation rules Bypass EF’s query pipeline and interact directly with the database
Get a thorough introduction to ADO.NET Entity Framework 4 -- Microsoft's core framework for modeling and interacting with data in .NET applications. The second edition of this acclaimed guide provides a hands-on tour of the framework latest version in Visual Studio 2010 and .NET Framework 4. Not only will you learn how to use EF4 in a variety of applications, you'll also gain a deep understanding of its architecture and APIs. 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 applications Learn to query your data, using either LINQ to Entities or Entity SQL Create Windows Forms, WPF, ASP.NET Web Forms, and ASP.NET MVC applications Build and consume WCF Services, WCF Data Services, and WCF RIA Services Use Object Services to work directly with your entity objects Create persistent ignorant entities, repositories, and write unit tests Delve into model customization, relationship management, change tracking, data concurrency, and more Get scores of reusable examples -- written in C# (with notes on Visual Basic syntax) -- that you can implement right away
Entity Framework 6 Recipes provides an exhaustive collection of ready-to-use code solutions for Entity Framework, Microsoft's model-centric, data-access platform for the .NET Framework and ASP.NET development. With this book, you will learn the core concepts of Entity Framework through a broad range of clear and concise solutions to everyday data access tasks. Armed with this experience, you will be ready to dive deep into Entity Framework, experiment with new approaches, and develop ways to solve even the most difficult data access challenges. If you are a developer who likes to learn by example, then this is the right book for you. Gives ready-to-use, real-world recipes to help you with everyday tasks Places strong focus on DbContext and the Code First approach Covers new features such as Asynch Query and Save, Codebased Configuration, Connection Resiliency, Dependency Resolution, and much more What you’ll learn Implement basic data access design patterns using Entity Framework. Seamlessly model your solutions across both code and data. Provide data access to Windows 8 and Metro applications. Integrate with WCF Data Services Improve data access performance. Simplify and reduce your code through data binding. Who this book is for Entity Framework 6 Recipes is for anyone learning Microsoft’s Entity Framework—Microsoft’s primary data access platform in the .NET Framework. If you have ever struggled to learn a new technology, programming model, or way of doing something, you know how helpful simple and real-world examples can be. For the beginning developer, this book provides concrete examples for common data access tasks. For developers having experience with previous Microsoft data access platforms, this book provides a task-by-task mapping between previous approaches and the patterns used in Entity Framework. Table of Contents Getting Started with Entity Framework Entity Data Modeling Fundamentals Querying an Entity Data Model Using Entity Framework in ASP.NET Loading Entities and Navigation Properties Beyond the Basics with Modeling and Inheritance Working with Object Services Plain Old CLR Objects Using the Entity Framework in N-Tier Applications Stored Procedures Functions Customizing Entity Framework Objects Improving Performance Concurrency
Author: Charlie Calvert
Publisher: Addison-Wesley Professional
Release Date: 2009-03-12
“Charlie and Dinesh bring important skills to this project that enable them to show how LINQ works and the practical ways you can use it in your daily development process.” From the Foreword by Anders Hejlsberg LINQ is one of Microsoft’s most exciting, powerful new development technologies. Essential LINQ is the first LINQ book written by leading members of Microsoft’s LINQ and C# teams. Writing for architects, developers, and development managers, these Microsoft insiders share their intimate understanding of LINQ, revealing new patterns and best practices for getting the most out of it. Calvert and Kulkarni begin by clearly explaining how LINQ resolves the long-time “impedance mismatch” between object-oriented code and relational databases. Next, they show how LINQ integrates querying into C# as a “first-class citizen.” Using realistic code examples, they show how LINQ provides a strongly typed, IntelliSense-aware technology for working with data from any source, including SQL databases, XML files, and generic data structures. Calvert and Kulkarni carefully explain LINQ’s transformative, composable, and declarative capabilities. By fully illuminating these three concepts, the authors allow developers to discover LINQ’s full power. In addition to covering core concepts and hands-on LINQ development in C# with LINQ to Objects, LINQ to XML, LINQ to SQL, and LINQ to Entities, they also present advanced topics and new LINQ implementations developed by the LINQ community. This book • Explains the entire lifecycle of a LINQ project: design, development, debugging, and much more • Teaches LINQ from both a practical and theoretical perspective • Leverages C# language features that simplify LINQ development • Offers developers powerful LINQ query expressions to perform virtually any data-related task • Teaches how to query SQL databases for objects and how to modify those objects • Demonstrates effective use stored procedures and database functions with LINQ • Shows how to add business logic that reflects the specific requirements of your organization • Teaches developers to create, query, and transform XML data with LINQ • Shows how to transform object, relational, and XML data between each other • Offers best patterns and practices for writing robust, easy-to-maintain LINQ code
Entity Framework 4.0 Recipes provides an exhaustive collection of ready-to-use code solutions for Entity Framework, Microsoft’s vision for the future of data access. Entity Framework is a model-centric data access platform with an ocean of new concepts and patterns for developers to learn. With this book, you will learn the core concepts of Entity Framework through a broad range of clear and concise solutions to everyday data access tasks. Armed with this experience, you will be ready to dive deep into Entity Framework, experiment with new approaches, and develop ways to solve even the most difficult data access challenges. If you are a developer who likes to learn by example, then this is the right book for you. Gives ready-to-use, real-world recipes to help you with everyday tasks Provides guideposts for learning core concepts Maps out key landmarks for experimenting with your own solutions What you’ll learn Solve the most common data access problems using Entity Framework. Implement basic data access design patterns using Entity Framework. Seamlessly model your solutions across both code and data. Improve data access performance. Use data binding to simplify and reduce your code. Leverage the recipes to empower your own exploration of Entity Framework. Who this book is for This book is for anyone learning Microsoft’s Entity Framework—Microsoft’s primary data access platform. If you have ever struggled to learn a new technology, programming model, or way of doing something, you know how helpful simple, real-world examples can be. For the beginning developer, this book provides concrete examples for common data access tasks. For developers with experience with previous Microsoft access platforms, this book provides a task-by-task mapping between previous approaches and the patterns used in Entity Framework. Table of Contents Getting Started With Entity Framework Entity Data Modeling Fundamentals Querying an Entity Data Model Using Entity Framework in ASP.NET Loading Entities and Navigation Properties Beyond the Basics with Modeling and Inheritance Working with Object Services Plain Old CLR Objects Using the Entity Framework in N-Tier Applications Stored Procedures Functions Customizing Entity Framework Objects Improving Performance Concurrency Advanced Modeling
This book is for .NET developers who are developing data-driven applications using ADO.NET or other data access technologies. This book is going to give you everything you need to effectively develop and manage data-driven applications using Entity Framework.
Leverage the full potential of Entity Framework with this collection of powerful and easy-to-follow recipes About This Book Learn how to use the new features of Entity Framework Core 1 Improve your queries by leveraging some of the advanced features Avoid common pitfalls Make the best of your .NET APIs by integrating with Entity Framework Who This Book Is For This book is for .NET developers who work with relational databases on a daily basis and understand the basics of Entity Framework, but now want to use it in a more efficient manner. You are expected to have some prior knowledge of Entity Framework. What You Will Learn Master the technique of using sequence key generators Validate groups of entities that are to be saved / updated Improve MVC applications that cover applications developed using ASP.NET MVC Core 1 Retrieve database information (table, column names, and so on) for entities Discover optimistic concurrency control and pessimistic concurrency control. Implement Multilatency on the data side of things. Enhance the performance and/or scalability of Entity Framework Core Explore and overcome the pitfalls of Entity Framework Core In Detail Entity Framework is a highly recommended Object Relation Mapping tool used to build complex systems. In order to survive in this growing market, the knowledge of a framework that helps provide easy access to databases, that is, Entity Framework has become a necessity. This book will provide .NET developers with this knowledge and guide them through working efficiently with data using Entity Framework Core. You will start off by learning how to efficiently use Entity Framework in practical situations. You will gain a deep understanding of mapping properties and find out how to handle validation in Entity Framework. The book will then explain how to work with transactions and stored procedures along with improving Entity Framework using query libraries. Moving on, you will learn to improve complex query scenarios and implement transaction and concurrency control. You will then be taught to improve and develop Entity Framework in complex business scenarios. With the concluding chapter on performance and scalability, this book will get you ready to use Entity Framework proficiently. Style and approach Filled with rich code-based examples, this book takes a recipe-based approach that will teach .NET developers to improve their understanding of Entity Framework and help them effortlessly apply this knowledge in everyday situations.
This book is intended for software developers with some prior experience with the Microsoft .NET framework who want to learn how to use Entity Framework. This book will get you up and running quickly, providing many examples that illustrate all the key concepts of Entity Framework.
A comprehensive guide to the Entity Framework with insight into its latest features and optimizations for responsive data access in your projects About This Book Create Entity data models from your database and use them in your applications Learn about the Entity Client data provider and write statements in Entity SQL to perform CRUD operations Explore ADO.NET Data Services and how they work with the Entity Framework Who This Book Is For If you are a C# developer who wants to learn a new way of querying data and utilizing it in applications efficiently for data binding or other operations, then this book is for you. Basic knowledge of ADO.NET is assumed. What You Will Learn Explore the features of the ADO.NET Entity Framework Understand the concepts of entities and their relationships Create an Entity Data Model using the ADO.NET Entity Data Model Designer and the EdmGen tool Extend existing Entity Types to create your own Entity Types Write programs against the Entity Data Model to perform CRUD operations Discover ADO.NET Data Services and learn how they can be used with the Entity Framework Familiarize yourself with WCF Data Services (formerly ADO.NET Data Services) Apply Code First, Model First and Database First approaches In Detail The ADO.NET Entity Framework from Microsoft is a new ADO.NET development framework that provides a level of abstraction for data access strategies and solves the impedance mismatch issues that exist between different data models. This book explores Microsoft's Entity Framework and explains how it can used to build enterprise level applications. It will also teach you how you can work with RESTful Services and Google's Protocol Buffers with Entity Framework and WCF. You will explore how to use Entity Framework with ASP.NET Web API and also how to consume the data exposed by Entity Framework from client applications of varying types, i.e., ASP.NET MVC, WPF and Silverlight. You will familiarize yourself with the new features and improvements introduced in Entity Framework including enhanced POCO support, template-based code generation, tooling consolidation and connection resiliency. By the end of the book, you will be able to successfully extend the new functionalities of Entity framework into your project. Style and approach This book is a step-by-step tutorial providing hands-on code examples with detailed explanations. The book aims to explain the concepts of the Entity Framework and illustrate how you can use these in applications with a tutorial based approach.
This new 7th edition of Pro C# 6.0 and the .NET 4.6 Platform has been completely revised and rewritten to reflect the latest changes to the C# language specification and new advances in the .NET Framework. You'll find new chapters covering all the important new features that make .NET 4.6 the most comprehensive release yet, including: A Refined ADO.NET Entity Framework Programming Model Numerous IDE and MVVM Enhancements for WPF Desktop Development Numerous updates to the ASP.NET Web APIs This comes on top of award winning coverage of core C# features, both old and new, that have made the previous editions of this book so popular. Readers will gain a solid foundation of object-oriented development techniques, attributes and reflection, generics and collections as well as numerous advanced topics not found in other texts (such as CIL opcodes and emitting dynamic assemblies). The mission of this book is to provide you with a comprehensive foundation in the C# programming language and the core aspects of the .NET platform plus overviews of technologies built on top of C# and .NET (ADO.NET and Entity Framework, Windows Communication Foundation (WCF), Windows Presentation Foundation (WPF), ASP.NET (WebForms, MVC, WebAPI).). Once you digest the information presented in these chapters, you’ll be in a perfect position to apply this knowledge to your specific programming assignments, and you’ll be well equipped to explore the .NET universe on your own terms. What You Will Learn: Be the first to understand the .NET 4.6 platform and C# 6. Discover the ins and outs of the leading .NET technology. Learn from an award-winning author who has been teaching the .NET world since version 1.0. Find complete coverage of XAML, .NET 4.6 and Visual Studio 2015 together with discussion of the new Windows Runtime.
Author: John Paul Mueller
Publisher: Pearson Education
Release Date: 2013-08-15
Your hands-on guide to Entity Framework fundamentals Expand your expertise—and teach yourself the fundamentals of the Microsoft ADO.NET Entity Framework 5. If you have previous programming experience but are new to the Entity Framework, this tutorial delivers the step-by-step guidance and coding exercises you need to master core topics and techniques. Discover how to: Access data in a managed way—using minimal code Apply three workflows supported by the Entity Framework Perform essential tasks with full automation in place Manipulate data with both LINQ and Entity SQL Create examples that rely on Table-Valued Functions Determine the remedies for Entity-specific exceptions Explore the use of optimistic and pessimistic concurrency Define mappings between your applications and data sources
Learn how to leverage the features of the new Entity Framework Core APIs and use them to build pure .NET Core applications. About This Book Learn how to effectively manage your database to make it more productive and maintainable. Write simplified queries using LINQ to acquire the desired data easily Raise the abstraction level from data to objects so teams can function independently, resulting in easily maintainable code Who This Book Is For This book is for .NET Core developers who would like to integrate EF Core in their application. Prior knowledge of .NET Core and C# is assumed. What You Will Learn Create databases and perform CRUD operations on them Understand and build relationships (related to entities, keys, and properties) Understand in-built, custom, and remote validation (both client and server side) You will learn to handle concurrency to build responsive applications You will handle transactions and multi-tenancy while also improving performance In Detail Being able to create and maintain data-oriented applications has become crucial in modern programming. This is why Microsoft came up with Entity Framework so architects can optimize storage requirements while also writing efficient and maintainable application code. This book is a comprehensive guide that will show how to utilize the power of the Entity Framework to build efficient .NET Core applications. It not only teaches all the fundamentals of Entity Framework Core but also demonstrates how to use it practically so you can implement it in your software development. The book is divided into three modules. The first module focuses on building entities and relationships. Here you will also learn about different mapping techniques, which will help you choose the one best suited to your application design. Once you have understood the fundamentals of the Entity Framework, you will move on to learn about validation and querying in the second module. It will also teach you how to execute raw SQL queries and extend the Entity Framework to leverage Query Objects using the Query Object Pattern. The final module of the book focuses on performance optimization and managing the security of your application. You will learn to implement failsafe mechanisms using concurrency tokens. The book also explores row-level security and multitenant databases in detail. By the end of the book, you will be proficient in implementing Entity Framework on your .NET Core applications. Style and approach This book is filled with various examples that will help you use Entity Framework Core 2.0 to write efficient software.
Get up and running quickly with Microsoft ASP.NET MVC and Entity Framework as you build and deploy complex websites. By using a fully working example retail website you will learn solutions to real-world issues that developers frequently encounter. Whether you are a novice developer or an experienced .NET developer wishing to learn more about MVC and Entity Framework, author Lee Naylor will teach you how to develop a detailed database-driven example website using Microsoft ASP.NET and Entity Framework Code First with fully explained code examples. What You Will Learn: • Get up and running quickly with ASP.NET MVC and Entity Framework to build a complex website to display and manage several related entities• Integrate identity code into a project• Understand advanced topics, including asynchronous database access and managing data conflicts• Work with Microsoft Azure, including remote debugging and database access• Develop your CSS skills, including animations and media queries for use with tablet or mobile/cell phone devices Who This Book Is For: Novice developers new to the subject through to more experienced ASP.NET web forms developers looking to migrate from web forms to MVC and Entity Framework. The book assumes some programming knowledge such as object-oriented programming concepts and a basic knowledge of C#.