LINQ Quickly


LINQ Quickly
eBook: $20.99
Formats: PDF, PacktLib, ePub and Mobi formats
$17.84
save 15%!
Print + free eBook + free PacktLib access to the book: $55.98    Print cover: $34.99
$34.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Support
Sample Chapters
  • LINQ to Objects
  • LINQ to XML
  • LINQ to SQL
  • LINQ to DataSets
  • LINQ to XSD

 

Book Details

Language : English
Paperback : 252 pages [ 235mm x 191mm ]
Release Date : November 2007
ISBN : 1847192548
ISBN 13 : 9781847192547
Author(s) : N Satheesh Kumar
Topics and Technologies : All Books, Microsoft Development , Other, Enterprise, Microsoft


Table of Contents

Preface
Chapter 1: Overview
Chapter 2: LINQ to Objects
Chapter 3: LINQ to XML
Chapter 4: LINQ to SQL
Chapter 5: LINQ over DataSet
Chapter 6: LINQ to XSD
Chapter 7: Standard Query Operators
Appendix A: Building an ASP.NET Application
Appendix B: LINQ with Outlook
Index
  • Chapter 1: Overview
    • LINQ Architecture
    • Integration with SQL
    • Integration with XML
    • Support for C# 3.0 Language Features
      • Anonymous Types
      • Object Initializers
        • Collection Initializers
        • Partial Methods
      • Implicitly Typed Local Variables
      • Extensions
      • Expressions
        • Lambda Expressions
        • Query Expressions
        • Expression Trees
    • Summary
  • Chapter 3: LINQ to XML
    • Features
      • Classes and Hierarchy
        • XElement Class
        • XAttribute Class
        • XDocument Class
        • Other Classes
    • LINQ to XML with Other XML Technologies
      • LINQ with XmlReader
      • LINQ with XSLT
        • LINQ with MSXML
        • Functional Construction
    • XML Names
    • Loading and Traversing XML
      • Loading XML
      • Traversing XML
    • Data Manipulation
      • Inserting or Adding Elements to XML
      • Inserting or Adding XML Attributes
      • Deleting XML
      • Updating XML
      • Deleting XML Attributes
      • Updating XML Attributes
  • Outputting and Streaming XML
    • Streaming XML
  • Querying XML
    • Query Operators
    • Queries
    • Ancestors and Descendants
    • XML Transformation
    • Dictionaries
      • Convert Dictionary to XML
      • Create Dictionary from XML
  • Writing XML as Text Files and CSV Files
  • Reading from CSV Files
  • LINQ to XML Events
  • XML Literals and Embedded Expressions in Visual Basic
  • Summary
  • Chapter 4: LINQ to SQL
    • Working with Databases Using DataContext
    • Entity Classes
      • Attributes
        • Database Attribute
        • Table Attribute
        • Column Attribute
        • Association Attribute (Foreign Keys)
        • Relationships
        • Function Attribute
        • Parameter Attribute
        • Inheritance Mapping Attribute
    • Creating and Deleting Databases
    • DataContext Methods
    • Data Manipulation
    • LINQ to SQL Queries
      • Identifying Objects
      • Queries with Multiple Entities
        • Remote Queries and Local Queries
        • Deferred Loading
        • Immediate Loading
        • Projections
      • Constructing XML
      • Joins
      • Raw SQL Query
      • Query Result
      • Stored Procedures
        • User-Defined Functions
        • Class Generator Tool
      • Transactions
      • Handling Concurrency Conflicts
    • Object Relational Designer (O/R Designer)
    • Summary
  • Chapter 5: LINQ over DataSet
    • Loading Data into DataSets
    • Querying Datasets
    • Sequence Operator
    • Querying Typed DataSets
    • DataSet Query Operators
      • CopyToDataTable
      • LoadDataRow
      • Intersect
      • Union
      • Except
      • Field<T>
      • SetField<T>
    • Projection
    • Join
    • SequenceEqual
    • Skip
    • Distinct
    • Summary
  • Chapter 6: LINQ to XSD
    • Un-typed XML
    • Creating Typed XML using Visual Studio
      • Object Construction
      • Load Method
      • Parse Method
      • Save Method
      • Clone Method
      • Default Values
    • Customization of XML Objects
      • Mapping Time Customization
      • Compile Time Customization
      • Post Compile Customization
    • Using LINQ to XSD at Command Line
    • Summary
  • Ordering Operators
  • Set Operators
    • Distinct
    • Except
    • Intersect
    • Union
  • Grouping Operators
    • GroupBy
      • ToLookup
  • Conversion Operators
    • AsEnumerable
    • Cast
    • OfType
    • ToArray
    • ToDictionary
    • ToList
    • ToLookup
  • Equality Operators
    • SequenceEqual
  • Generation Operators
    • Empty
    • Range
    • Repeat
  • Quantifiers
    • All
    • Any
    • Contains
  • Aggregation Operators
    • Average
    • Count
    • LongCount
    • Min
    • Max
    • Sum
    • Aggregate
  • Partitioning Operators
    • Take
    • Skip
    • TakeWhile
    • SkipWhile
    • TakeWhile
  • Element Operators
    • DefaultIfEmpty
    • ElementAt
    • ElementAtOrDefault
    • First
    • FirstOrDefault
    • Last
    • LastOrDefault
    • Single
    • SingleOrDefault
  • List of Query Operators
    • Query Operator Equivalent Expressions
  • Summary

N Satheesh Kumar

N. Satheesh Kumar has Bachelor’s Degree in Computer Science Engineering and has around twelve years of experience in software development life cycle, project, and program management. He started his career developing software applications using Borland software products in a company based in India and then moved to the United Arab Emirates and continued developing applications using Borland Delphi and customizing Great Plain Dynamics (now known as Microsoft Dynamics) for an automobile sales company. He moved back to India and spent three years designing and developing application software using Microsoft products for a top Multinational Company in India and then spent couple of years in Project Management and Program Management activities. Now he works as a Technical Architect for a top retail company based in the United States. He works with the latest Microsoft technologies and has published many articles on LINQ and other features of .NET. He is also the author of the book LINQ Quickly in Microsoft .NET.

Contact N Satheesh Kumar

Sorry, we don't have any reviews for this title yet.

Code Downloads

Download the code and support files for this book.


Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

LINQ Quickly +    Microsoft Silverlight 5 Data and Services Cookbook =
50% Off
the second eBook
Price for both: $41.10

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Overview of new features for LINQ in .NET 3.0—partial methods, expressions, anonymous types, initializers, and implicitly typed local variables
  • Accessing in-memory data structures using LINQ—lists, arrays, and dictionaries
  • Directly querying the collections and filtering the required values without using powerful filtering, ordering, and grouping capabilities
  • Creating and manipulating XML data through .NET using XElement and XAttribute
  • Creating and navigating XML trees using Functional Construction
  • Importing and exporting data from dictionaries, databases, objects, and CSV files
  • Creating and manipulating the database objects using the DataContext object
  • Working with stored procedures, user-defined functions, handling concurrency conflicts, and transactions during database updates
  • Working with .NET framework data providers and DataSets
  • Using DataSet for easier and faster querying of cached data
  • Working with typed and un-typed XML trees using XSD
  • Examining standard query operators provided by LINQ and using them to query data sources
  • Implementing your own standard query operators
  • Building an ASP.NET web application

Chapter 1 looks at the overall features of LINQ, and gives an overview of different operators provided by LINQ to operate on objects, XML, relational databases, etc.
 
Chapter 2 examines LINQ to Objects, which means that you can use LINQ to query objects in a collection. Using this feature, you can access in-memory data structures using LINQ. You can directly query collections, and filter out required values without using powerful filtering, ordering, and grouping capabilities.

Chapter 3 looks at LINQ to XML. It is a new in-memory XML programming API to work against XML data. There are different ways of creating XML trees in .NET. LINQ to XML is the new method of creating and manipulating XML data through .NET. The properties and methods of LINQ help in navigating and manipulating XML elements and attributes.

Chapter 4, which covers LINQ to SQL, takes care of translating LINQ expressions into equivalent T-SQL, passing it on to the database for execution, and then returning the results back to the calling application. It reduces programming time a lot, and comes with two different design-time tools, which are used for converting the relational database objects into object definitions. It also has the ability to create databases, and database objects.

Chapter 5 examines LINQ to DataSets. An ADO.NET DataSet provides a disconnected data source environment for applications. It can be used with multiple data sources. The DataSet has the flexibility of handling data locally in cache memory where the application resides. The application can continue working with a DataSet when it is disconnected from the source and is not dependent on the availability of the data source. The DataSet maintains information about the changes made to data so that updates can be tracked and sent back to the database as soon as the data source is available or reconnected.

Chapter 6 covers LINQ to XSD. It enhances XML programming by adding the feature of typed views on un-typed XML trees. LINQ to XSD gives a better programming environment by providing the object models generated from XML schemas. This is called typed XML programming.

Chapter 7 looks at standard query operators provided by LINQ, and how you can use some of them against different data sources.

In Detail

This book gets you started with LINQ and shows how it will make your programming life easier by making use of new features from the .NET Framework 3.0. This book is split into seven chapters, each of which is dedicated to presenting a feature of LINQ and its usage in real-life scenarios.

Language Integrated Query (LINQ) is a new feature in Visual Studio 2008 that extends its query capabilities, using C# and Visual Basic. Visual Studio 2008 comes with
LINQ provider assemblies that enable the use of LINQ with data sources such as in-memory collections, SQL relational databases, ADO.NET Datasets, XML documents, etc.
In Visual Studio 2008, Visual C# and Visual Basic are the languages that implement the LINQ language extensions. LINQ language extensions use the new standard query operators API, which is the query language for any collection that implements IEnumerable<T>.

Approach

This book introduces the reader to the basic concepts of LINQ, and takes them through using LINQ with an example-driven approach.

Who this book is for

This book is for .NET developers who want to find out exactly what LINQ is, what it can do for them, and how to program with LINQ.
This book presumes a sound knowledge of XML, ADO.NET, and .NET data access—No knowledge of LINQ is presumed.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software