当前位置: 首页 > 资源下载 > .NET > 查看资源

资源分类
Web开发
Java
.NET
编程语言
数据库
软件工程
图形动画
系统管理
网络通信安全
计算机理论
考试认证
人文百科
文档手册
硬件技术
办公软件

Professional ADO.NET 3.5 with LINQ and the Entity Framework

Professional ADO.NET 3.5 with LINQ and the Entity Framework

书名:Professional ADO.NET 3.5 with LINQ and the Entity Framework

上传:石头

时间:2009-08-30

文件大小:8.61 MB

资源出处:查看资源出处 >>

收藏到网摘: n/a



作者:Roger Jennings
出版日期:February 3, 2009
出版社:Wrox Press
页数:672
ISBN:ISBN-10: 047018261X ISBN-13: 978-0470182611
文件格式:PDF


Product Description
Language Integrated Query (LINQ), as well as the C# 3.0 and VB 9.0language extensions to support it, is the most import single newfeature of Visual Studio 2008 and the .NET Framework 3.x. LINQ isMicrosoft’s first attempt to define a universal query language for adiverse set of in-memory collections of generic objects, entitiespersisted in relational database tables, and element and attributes ofXML documents or fragments, as well as a wide variety of other datatypes, such as RSS and Atom syndication feeds. Microsoft investedmillions of dollars in Anders Hejlsberg and his C# design anddevelopment groups to add new features to C# 3.0—such as lambdaexpressions, anonymous types, and extension methods—specifically tosupport LINQ Standard Query Operators (SQOs) and query expressions as apart of the language itself.Corresponding additions to VB 9.0 followed the C# team’s lead, butVB’s implementation of LINQ to XML offers a remarkable new addition tothe language: XML literals. VB’s LINQ to XML implementation includesXML literals, which treat well-formed XML documents or fragments aspart of the VB language, rather than requiring translation of elementand attribute names and values from strings to XML DOM nodes and values.
This book concentrates on hands-on development of practical Windowsand Web applications that demonstrate C# and VB programming techniquesto bring you up to speed on LINQ technologies. The first half of thebook covers LINQ Standard Query Operators (SQOs) and the concreteimplementations of LINQ for querying collections that implement genericIEnumerable, IQueryable, or both interfaces. Thesecond half is devoted to the ADO.NET Entity Framework, Entity DataModel, Entity SQL (eSQL) and LINQ to Entities. Most code examplesemulate real-world data sources, such as the Northwind sample databaserunning on SQL Server 2005 or 2008 Express Edition, and collectionsderived from its tables. Code examples are C# and VB Windows form orWeb site/application projects not, except in the first chapter, simplecommand-line projects. You can’t gain a feel for the behavior orperformance of LINQ queries with “Hello World” projects that processarrays of a few integers or a few first and last names.
This book is intended for experienced .NET developers using C# or VBwho want to gain the maximum advantage from the query-processingcapabilities of LINQ implementations in Visual Studio 2008—LINQ toObjects, LINQ to SQL, LINQ to DataSets, and LINQ to XML—as well as theobject/relational mapping (O/RM) features of VS 2008 SP1’s EntityFramework/Entity Data Model and LINQ to Entities and the increasingnumber of open-source LINQ implementations by third-party developers.
Basic familiarity with generics and other language featuresintroduced by .NET 2.0, the Visual Studio integrated developmentenvironment (IDE), and relational database management systems (RDBMSs),especially Microsoft SQL Server 200x, is assumed. Experience with SQLServer’s Transact-SQL (T-SQL) query language and stored procedures willbe helpful but is not required. Proficiency with VS 2005, .NET 2.0, C#2.0, or VB 8.0 will aid your initial understanding of the book’s C# 3.0or VB 9.0 code samples but isn’t a prerequisite.
Microsoft’s.NET code samples are primarily written in C#. All code samples in thisbook’s chapters and sample projects have C# and VB versions unlessthey’re written in T-SQL or JavaScript.
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 System.Web.Entity for EF’s Entity SQL.
“Taking a New Approach to Data Access in ADO.NET 3.5,” uses simpleC# and VB code examples to demonstrate LINQ to Objects queries againstin-memory objects and databinding with LINQ-populated genericList collections, object/relational mapping (O/RM) with LINQto SQL, joining DataTables with LINQ to DataSets, creating EntitySetswith LINQ to Entities, querying and manipulating XML InfoSets with LINQto XML, and performing queries against strongly typed XML documentswith LINQ to XSD.“Understanding LINQ Architecture and Implementation,” begins withthe namespaces and C# and VB language extensions to support LINQ, LINQStandard Query Operators (SQOs), expression trees and compiled queries,and a preview of domain-specific implementations. C# and VB sampleprojects demonstrate object, array, and collection initializers,extension methods, anonymous types, predicates, lambda expressions, andsimple query expressions.“Executing LINQ Query Expressions with LINQ to Objects,” classifiesthe 50 SQOs into operator groups: Restriction, Projection,Partitioning, Join, Concatenation, Ordering, Grouping, Set, Conversion,and Equality, and then lists their keywords in C# and VB. VS 2008 SP1includes C# and VB versions of the LINQ Project Sample Query Explorer,but the two Explorers don’t use real-world collections as data sources.This describes a LINQ in-memory object generator (LIMOG) utilityprogram that writes C# 3.0 or VB 9.0 class declarations forrepresentative business objects that are more complex than those usedby the LINQ Project Sample Query Explorers. Sample C# and VB querieswith these business objects as data sources are more expressive thanthose using a arrays of a few integers or last names.“Working with Advanced Query Operators and Expressions,” introducesLINQ queries against object graphs with entities that have related(associated) entities. This begins with examples of aggregateoperators, explains use of the Let temporary local variable operator, shows you how to use Group By with aggregate queries, conduct the equivalent of left outer joins, and take advantage of the Contains() SQO to emulate SQL’s IN()function. You learn how to compile queries for improved performance,and create mock object classes for testing without the overhead ofqueries against relational persistence stores.“Using LINQ to SQL and the LinqDataSource,” introduces LINQ to SQLas Microsoft’s first O/RM tool to reach released products status andshows you how to autogenerate class files for entity types with thegraphical O/R Designer or command-line SqlMetal.exe. This also explains how to edit *.dbml mapping files in the Designer or XML Editor, instantiate DataContextobjects, and use LINQ to SQL as a Data Access Layer (DAL) with T-SQLqueries or stored procedures. Closes with a tutorial for using theASP.NET LinqDataSource control with Web sites or applications.“Querying DataTables with LINQ to DataSets,” begins with a comparison of DataSet and DataContext objects and features, followed by a description of the DataSetExtensions. Next comes querying untyped and typed DataSets, creating lookup lists, and generating LinqDataViews for databinding with the AsDataView() method. This ends with a tutorial that shows you how to copy LINQ query results to DataTables.“Manipulating Documents with LINQ to XML,” describes one of LINQmost powerful capabilities: managing XML Infosets. This demonstratesthat LINQ to XML has query and navigation capabilities that equal orsurpasses XQuery 1.0 and XPath 2.0. It also shows LINQ to XML documenttransformation can replace XQuery and XSLT 1.0+ in the majority ofcommon use cases. You learn how to use VB 9.0’s XML literals toconstructs XML documents, use GroupJoin() to produce hierarchical documents, and work with XML namespaces in C# and VB.“Exploring Third-Party and Emerging LINQ Implementations,”describes Microsoft’s Parallel LINQ (also called PLINQ) for takingadvantage of multiple CPU cores in LINQ to Objects queries, LINQ toREST for translating LINQ queries into Representational State TransferURLs that define requests to a Web service with the HTML GET, POST,PUT, and DELETE methods, and Bart De Smet’s LINQ to Active Directoryand LINQ to SharePoint third-party implementations.“Raising the Level of Data Abstraction with the Entity Data Model,”starts with a guided tour of the development of EDM and EF as an O/RMtool and heir apparent to ADO.NET DataSets, provides a briefdescription of the entity-relationship (E-R) data model and diagrams,and then delivers a detailed analysis of EF architecture. Next comes anintroduction to the Entity SQL (eSQL) language, eSQL queries, clientviews, and Object Services, including the ObjectContext, MetadataWorkspace, and ObjectStateManager.Later chapters describe eSQL and these objects in greater detail. TwoC# and VB sample projects expand on the eSQL query and Object Servicessample code.“Defining Conceptual, Mapping, and Storage Schema Layers,” provides detailed insight into the structure of the *.edmx file that generates the *.ssdl (storage schema data language), *.msl (mapping schema language), and *.csdlfiles at runtime. You learn how to edit the *.edmx file manually toaccommodate modifications that the graphic EDM Designer can’t handle.You learn how to implement the Table-per-Hierarchy (TPH) inheritancemodel and traverse the MetadataWorkspace to obtain property values.Four C# and VB sample projects de…From the Back Cover
Professional ADO.NET 3.5 with LINQ and the Entity Framework
LINQ and the Entity Framework are revolutionizing .NET databaseprogramming. With this book as your guide, you’ll discover how toleverage these cutting-edge query and object/relational mappingtechnologies for enterprise-class computing. It provides you withhands-on coding techniques for data-intensive web and Windows projects.You’ll also get quickly up to speed on LINQ technologies with the helpof C# and VB programming examples.
Leading Microsoft database authority Roger Jennings first coversLINQ Standard Query Operators (SQOs) and domain-specific LINQ to SQL,LINQ to DataSet, and LINQ to XML implementations for querying genericcollections. He then delves into the ADO.NET Entity Framework, EntityData Model, Entity SQL (eSQL), and LINQ to Entities. Numerous codeexamples are integrated throughout the chapters that emulate real-worlddata sources and show you how to develop C# and VB web site/applicationor Windows projects.
The information in this book will give you the tools to create andmaintain applications that are independent of the underlying relationaldata.
What you will learn from this book
A new approach to data access in ADO.NET 3.5 SP1Methods for working with advanced LINQ query operators and expressionsTechniques for querying SQL Server® database with LINQ to SQLApproaches for integrating third-party and emerging LINQ implementationsHow to raise the level of data abstraction with the Entity Data ModelSteps for creating design-time data sources from ObjectContextWays to use the Entity Data Model as a data sourceWho this book is for
This book is for intermediate to advanced developers of data-intensive .NET web- and Windows-based applications.
Wrox Professional guides are planned and written by workingprogrammers to meet the real-world needs of programmers, developers,and IT professionals. Focused and relevant, they address the issuestechnology professionals face every day. They provide examples,practical solutions, and expert education in new technologies, alldesigned to help programmers do a better job.
Tags:ADOentityFrameworkLINQProfessional


相关书籍

  • Adobe AIR in Action (PDF 英文版)
  • Creating Mashups with Adobe Flex and AIR
  • Flash Video for Professionals (PDF 英文版)
  • Professional Silverlight 2 for ASP.NET Developers
  • Beginning PL/SQL: From Novice to Professional (PDF 英文版)

评论 (3) 1 All

登陆 | 还没注册?