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

ADO.NET and LINQ connect

676 289 0

Đ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 676
Dung lượng 12,95 MB

Nội dung

ADO.NET and LINQ connect

Professional ADO.NET 3.5 with LINQ and the Entity Framework www.wrox.com $49.99 USA $59.99 CAN Wrox Professional guides are planned and written by working programmers to meet the real-world needs of programmers, developers, and IT professionals. Focused and relevant, they address the issues technology professionals face every day. They provide examples, practical solutions, and expert education in new technologies, all designed to help programmers do a better job. Recommended Computer Book Categories Programming Software Development ISBN: 978-0-470-18261-1 LINQ and the Entity Framework are revolutionizing .NET database programming. With this book as your guide, you’ll discover how to leverage these cutting-edge query and object/relational mapping technologies for enterprise-class computing. It provides you with hands-on coding techniques for data-intensive web and Windows projects. You’ll also get quickly up to speed on LINQ technologies with the help of C# and VB programming examples. Leading Microsoft database authority Roger Jennings first covers LINQ Standard Query Operators (SQOs) and domain-specific LINQ to SQL, LINQ to DataSet, and LINQ to XML implementations for querying generic collections. He then delves into the ADO.NET Entity Framework, Entity Data Model, Entity SQL (eSQL), and LINQ to Entities. Numerous code examples are integrated throughout the chapters that emulate real-world data sources and show you how to develop C# and VB web site/application or Windows projects. The information in this book will give you the tools to create and maintain applications that are independent of the underlying relational data. What you will learn from this book ● A new approach to data access in ADO.NET 3.5 SP1 ● Methods for working with advanced LINQ query operators and expressions ● Techniques for querying SQL Server ® database with LINQ to SQL ● Approaches for integrating third-party and emerging LINQ implementations ● How to raise the level of data abstraction with the Entity Data Model ● Steps for creating design-time data sources from ObjectContext ● Ways to use the Entity Data Model as a data source Enhance Your Knowledge Advance Your Career Who this book is for This book is for intermediate to advanced developers of data-intensive .NET web- and Windows-based applications. ADO.NET 3.5 with LINQ and the Entity Framework Jennings Professional spine=1.344" Updates, source code, and Wrox technical support at www.wrox.com Professional ADO.NET 3.5 with LINQ and the Entity Framework Roger Jennings Wrox Programmer to Programmer TM Wrox Programmer to Programmer TM Professional ADO.NET 3.5 with LINQ and the Entity Framework Enhance Your Knowledge Advance Your Career Professional ADO.NET 3.5 with LINQ and the Entity Framework 978-0-470-18261-1 This book is for intermediate to advanced developers of data- intensive .NET Windows and Web-based applications ASP.NET 3.5 Website Programming Problem-Design-Solution 978-0-470-18758-6 This book emphasizes n-tier ASP.NET Web application architectural design, something intermediate and advanced ASP.NET developers need and can’t find anywhere else. Professional ASP.NET 3.5: In C# and VB 978-0-470-18757-9 This book is for programmers and developers who are looking to make the transition to ASP.NET 3.5 with Visual Studio 2008 and either C# 3.0 (2008) or Visual Basic 9 (2008). Professional LINQ 978-0-470-04181-9 This book is for developers who want to learn about LINQ and how it can benefit and enhance their applications. Beginning ASP.NET 3.5 978-0-470-18759-3 This book is for anyone who wants to build rich and interactive web sites that run on the Microsoft platform. No prior experience in web development is assumed. Beginning T-SQL with Microsoft SQL Server 2005 and 2008 978-0-470-25703-6 This book will provide you with an overview of SQL Server query operations and tools used with T-SQL, Microsoft’s implementation of the SQL database query language. Get more out of WROX.com Programmer to Programmer ™ Interact Take an active role online by participating in our P2P forums Wrox Online Library Hundreds of our books are available online through Books24x7.com Wrox Blox Download short informational pieces and code to keep you up to date and out of trouble! Chapters on Demand Purchase individual book chapters in pdf format Join the Community Sign up for our free monthly newsletter at newsletter.wrox.com Browse Ready for more Wrox? We have books and e-books available on .NET, SQL Server, Java, XML, Visual Basic, C#/ C++, and much more! Contact Us. We always like to get feedback from our readers. Have a book idea? Need community support? Let us know by e-mailing wrox-partnerwithus@wrox.com Professional ADO.NET 3.5 with LINQ and the Entity Framework Introduction xxvii Part I: Getting a Grip on ADO.NET 3.5 Chapter 1: Taking a New Approach to Data Access in ADO.NET 3.5 3 Part II: Introducing Language Integrated Query Chapter 2: Understanding LINQ Architecture and Implementation 63 Chapter 3: Executing LINQ Query Expressions with LINQ to Objects 91 Chapter 4: Working with Advanced Query Operators and Expressions 155 Part III: Applying Domain-Specific LINQ Implementations Chapter 5: Using LINQ to SQL and the LinqDataSource 195 Chapter 6: Querying DataTables with LINQ to DataSet 243 Chapter 7: Manipulating Documents with LINQ to XML 267 Chapter 8: Exploring Third-Party and Emerging LINQ Implementations 317 Part IV: Introducing the ADO.NET Entity Framework Chapter 9: Raising the Level of Data Abstraction with the Entity Data Model 357 Chapter 10: Defining Storage, Conceptual, and Mapping Layers 393 Chapter 11: Introducing Entity SQL 433 Part V: Implementing the ADO.NET Entity Framework Chapter 12: Taking Advantage of Object Services and LINQ to Entities 469 Chapter 13: Updating Entities and Complex Types 503 Chapter 14: Binding Entities to Data-Aware Controls 533 Chapter 15: Using the Entity Framework as a Data Source 567 Index 607 ffirs.indd iffirs.indd i 12/22/08 12:20:27 PM12/22/08 12:20:27 PM ffirs.indd iiffirs.indd ii 12/22/08 12:20:28 PM12/22/08 12:20:28 PM Download at WoweBook.com Professional ADO.NET 3.5 with LINQ and the Entity Framework ffirs.indd iiiffirs.indd iii 12/22/08 12:20:28 PM12/22/08 12:20:28 PM ffirs.indd ivffirs.indd iv 12/22/08 12:20:28 PM12/22/08 12:20:28 PM Professional ADO.NET 3.5 with LINQ and the Entity Framework Roger Jennings Wiley Publishing, Inc. ffirs.indd vffirs.indd v 12/22/08 12:20:28 PM12/22/08 12:20:28 PM Professional ADO.NET 3.5 with LINQ and the Entity Framework Published by Wiley Publishing, Inc. 10475 Crosspoint Boulevard Indianapolis, IN 46256 www.wiley.com Copyright © 2009 by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada ISBN: 978-0-470-18261-1 Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 Library of Congress Cataloging-in-Publication Data Jennings, Roger. Professional ADO.NET 3.5 with Linq and the Entity Framework / Roger Jennings. p. cm. Includes index. ISBN 978-0-470-18261-1 (paper/website) 1. ActiveX. 2. Microsoft LINQ. 3. Database design. 4. Microsoft .NET. 5. Query languages (Computer science) I. Title. QA76.9.D26J475 2009 006.7'882—dc22 2008048201 No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions. Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make. Further, readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was written and when it is read. For general information on our other products and services please contact our Customer Care Department within the United States at (800) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002. Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Wrox Programmer to Programmer, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. All other trademarks are the property of their respective owners. Wiley Publishing, Inc. is not associated with any product or vendor mentioned in this book. Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books. ffirs.indd viffirs.indd vi 12/22/08 12:20:29 PM12/22/08 12:20:29 PM This book is dedicated to my wife, Alexandra. ffirs.indd viiffirs.indd vii 12/22/08 12:20:29 PM12/22/08 12:20:29 PM ffirs.indd viiiffirs.indd viii 12/22/08 12:20:29 PM12/22/08 12:20:29 PM [...]... and sample projects have C# and VB versions unless they’re written in T-SQL or JavaScript What This Book Covers Professional ADO.NET 3.5: LINQ and the Entity Framework concentrates on programming the System Linq and System .Linq. Expressions namespaces for LINQ to Objects, System.Data .Linq for LINQ to SQL, System.Data .Linq for LINQ to DataSet, System.Xml .Linq for LINQ to XML, and System.Data.Entity and. .. the C# 3.0 and VB 9.0 languages that enable LINQ queries against in-memory objects LINQ to Objects serves as the foundation for all other concrete LINQ implementations ❑ Chapter 2, “Understanding LINQ Architecture and Implementation,” begins with the namespaces and C# and VB language extensions to support LINQ, LINQ Standard Query Operators (SQOs), expression trees and compiled queries, and a preview... implementations: LINQ to SQL, LINQ to DataSets, LINQ to XML, and LINQ to Entities The chapter ’s 26 sample projects demonstrate LINQ coding techniques for introductory console, Windows form, and Web site applications in C# 3.0 and VB 9.0 ❑ Chapter 1, “Taking a New Approach to Data Access in ADO.NET 3.5,” uses simple C# and VB code examples to demonstrate LINQ to Objects queries against in-memory objects and databinding... Collections for Testing LINQ to SQL and LINQ to Entities Projects Creating Mock Object Classes and Initializers Creating Object Graphs with GroupJoin Expressions Summary 169 169 171 172 176 177 182 187 Part III: Applying Domain-Specific LINQ Implementations LINQ to SQL LINQ to DataSet LINQ to XML Chapter 5: Using LINQ to SQL and the LinqDataSource Object/Relational Mapping with LINQ to SQL Mapping Tables... Third-Party and Emerging LINQ Implementations,” describes Microsoft’s Parallel LINQ (also called PLINQ) for taking advantage of multiple CPU cores in LINQ to Objects queries, LINQ to REST for translating LINQ queries into Representational State Transfer URLs that define requests to a Web service with the HTML GET, POST, PUT, and DELETE methods, and Bart de Smet’s LINQ to Active Directory and LINQ to SharePoint... Exploring Third-Party and Emerging LINQ Implementations Emerging Microsoft LINQ Implementations Parallel LINQ Programming with PLINQ Processing Queries Running the PLINQ Samples LINQ to REST Adopting URIs as a Query Language Running the Sample Northwind.svc WCF Service and Client Projects Processing Services Requests with the NwindServicesClient LINQ to XSD LINQ to XSD’s History LINQ to Stored XML Third-Party... query-processing capabilities of LINQ implementations in Visual Studio 2008 — LINQ to Objects, LINQ to SQL, LINQ to DataSets, and LINQ to XML — as well as the object/relational mapping (O/RM) features of VS 2008 SP1’s Entity Framework/Entity Data Model and LINQ to Entities and the increasing number of open-source LINQ implementations by third-party developers Basic familiarity with generics and other language features... Mallalieu wisely adopted for EF v2 Finally, thanks to all the members of the LINQ, LINQ to SQL, and EF teams who patiently answered my and other users’ questions in the LINQ Project General, and ADO.NET Entity Framework and LINQ to Entities (Prerelease) forums Joe Wikert, Wiley Technical Publishing’s vice president and publisher, and Executive Editor Bob Elliott convinced me to start writing NET developer... Operators Ordering and Filtering Associated EntityCollections during Loading Composing Query Builder Methods to Write ObjectQueries Writing LINQ to Entities Queries Unsupported LINQ Keywords, Standard Query Operators, and Overloads Conventional LINQ to Entities Queries Using the Include() Operator with LINQ to Entities Queries Compiling LINQ to Entity Queries Comparing the Performance of LINQ to Entities... databinding with LINQ- populated generic List collections, object/relational mapping (O/RM) with LINQ to SQL, joining DataTables with LINQ to DataSets, creating EntitySets with LINQ to Entities, querying and manipulating XML InfoSets with LINQ to XML, and performing queries against strongly typed XML documents with LINQ to XSD The chapter concludes with a guided tour of the Entity Framework (EF) and Entity . covers LINQ Standard Query Operators (SQOs) and domain-specific LINQ to SQL, LINQ to DataSet, and LINQ to XML implementations for querying generic collections. He then delves into the ADO. NET. wisely adopted for EF v2. Finally, thanks to all the members of the LINQ, LINQ to SQL, and EF teams who patiently answered my and other users ’ questions in the LINQ Project General, and ADO. NET. wrox-partnerwithus@wrox.com Professional ADO. NET 3.5 with LINQ and the Entity Framework Introduction xxvii Part I: Getting a Grip on ADO. NET 3.5 Chapter 1: Taking a New Approach to Data Access in ADO. NET 3.5 3 Part II:

Ngày đăng: 19/04/2014, 20:11

TỪ KHÓA LIÊN QUAN