Programming With Microsoft LINQ

Programming With Microsoft LINQ

  • LINQ Introduction

    • What Is LINQ? Why Do We Need LINQ?
    • How LINQ Works – Relational Model vs. Hierarchical/Network Model; XML Manipulation
    • Language Integration – Declarative Programming; Type Checking; Transparency Across Different Type Systems
    • LINQ Implementations – LINQ to Objects; LINQ to ADO.NET; LINQ to XML
  • LINQ Syntax Fundamentals

    • LINQ Queries – From Clause; Where Clause; Select Clause; Group and Into Clauses; Orderby Clause; Join Clause; Let Clause
    • Deferred Query Evaluation; Extension Method Resolution
    • Degenerate Query Expressions; Exception Handling
  • Linq to Objects

    • Query Operators – The Where Operator;
    • Projection Operators  – Select, SelectMany
    • Ordering Operators  – OrderBy and OrderByDescending, ThenBy and ThenByDescending, Reverse Operator
    • Grouping Operators;
    • Join Operators  – Join, GroupJoin
    • Set Operators  – Distinct, Union, Intersect, and Except, Zip
    • Aggregate Operators  – Count and LongCount, Sum, Min and Max, Average, Aggregate
    • Generation Operators  – Range, Repeat, Empty
    • Quantifier Operators  – Any, All, Contains
    • Partitioning Operators  – Take, TakeWhile, Skip and SkipWhile
    • Element Operators  – First, FirstOrDefault, The Last and LastOrDefault, Single, SingleOrDefault, ElementAt and ElementAtOrDefault, DefaultIfEmpty
    • Other Operators  – Concat, SequenceEqual
    • Conversion Operators  – AsEnumerable, ToArray and ToList, ToDictionary, ToLookup, OfType and Cast
  • Choosing Between LINQ to SQL and LINQ to Entities
    • Comparison Factors; When to Choose LINQ to Entities and the Entity Framework; When to Choose LINQ to SQL; Other Considerations
  • LINQ to SQL: Querying Data
    • Entities in LINQ to SQL – External Mapping
    • Data Modeling – DataContext; Entity Classes; Entity Inheritance; Unique Object Identity; Entity Constraints
    • Associations Between Entities – EntityRef; EntitySet; Graph Consistency
    • Relational Model vs. Hierarchical Model
    • Data Querying – Projections; Stored Procedures and User-Defined Functions; Compiled Queries; Different Approaches to Querying Data;
    • Direct Queries; Deferred Loading of Entities; Deferred Loading of Properties; Read-Only DataContext Access
    • Limitations of LINQ to SQL – Aggregate Operators; Partitioning Operators; Element Operators; String Methods; DateTime Methods; LIKE Operator; Unsupported SQL Functionalities
    • LINQ to SQL – The IN/EXISTS Clause; SQL Query Reduction; Mixing .NET Code with SQL Queries
  • LINQ to SQL: Managing Data
    • CRUD and CUD Operations – Entity Updates; Database Updates; Customizing Insert, Update, and Delete
    • Database Interaction – Concurrent Operations; Transactions; Exceptions
    • Databases and Entities – Entity Attributes to Maintain Valid Relationships; Deriving Entity Classes; Attaching Entities; Binding Metadata
  • LINQ to SQL: Modeling Data and Tools
    • File Types; SQLMetal; Using the Object Relational Designer
  • LINQ to Entities: Modeling Data with Entity Framework
    • The Entity Data Model – Generating a Model from an Existing Database; Starting from an Empty Model; Generated Code; Entity Data Model (.edmx) Files
    • Associations and Foreign Keys; Complex Types; Inheritance and Conditional Mapping
    • Non-CUD Stored Procedures; CUD Stored Procedures; POCO Support; T4 Templates
  • LINQ to Entities: Querying Data
    • EntityClient Managed Providers
    • LINQ to Entities – Selecting Single Entities; Unsupported Methods and Keywords; Canonical and Database Functions; User-Defined
    • Functions; Stored Procedures
    • ObjectQuery and ObjectContext – Lazy Loading; Include; Load and IsLoaded; The LoadProperty Method; MergeOption; The ToTraceString Method; ExecuteStoreCommand and ExecuteStoreQuery; The Translate Method
    • Query Performance – Pre-Build Store Views; EnablePlanCaching; Pre-Compiled Queries; Tracking vs. No Tracking
  • LINQ to Entities: Managing Data
    • Managing Entities – Adding a New Entity; Updating an Entity; Deleting an Entity; Using SaveChanges; Cascade Add/Update/Delete; Managing Relationships
    • Using ObjectStateManager and EntityState – DetectChanges and AcceptAllChanges; ChangeObjectState and ChangeRelationshipState; ObjectStateManagerChanged
    • EntityKey; GetObjectByKey and TryGetObjectByKey
    • Managing Concurrency Conflicts; Managing Transactions
    • Detaching, Attaching, and Serializing Entities – Detaching Entities; Attaching Entities; ApplyOriginalValues and ApplyCurrentValues; Serializing Entities
  • LINQ to DataSet
    • Introducing LINQ to DataSet
    • Using LINQ to Load a DataSet – Loading a DataSet with LINQ to SQL; Loading Data with LINQ to DataSet
    • Using LINQ to Query a DataSet – Understanding DataTable.AsEnumerable; Creating DataView Instances with LINQ; Using LINQ to Query a
    • Typed DataSet; Accessing Untyped DataSet Data; Comparing DataRow Instances
  • LINQ to XML: Managing the XML Infoset
    • Introducing LINQ to XML
    • LINQ to XML Programming – XDocument; XElement; XAttribute; XNode; XName and XNamespace; Other X* Classes; XStreamingElement; XObject and Annotations
    • Reading, Traversing, and Modifying XML
  • LINQ to XML: Querying Nodes
    • Querying XML – Attribute, Attributes; Element, Elements; XPath Axes “Like” Extension Methods; XNode Selection Methods; InDocumentOrder
    • Understanding Deferred Query Evaluation; Using LINQ Queries over XML; Transforming XML with LINQ to XML
    • Support for XSD and Validation of Typed Nodes; Support for XPath and System.Xml.XPath; Securing LINQ to XML; Serializing LINQ to XML
  • Inside Expression Trees
    • Lambda Expressions; Expression Tree; Dissecting Expression Trees; Visiting an Expression Tree; Dynamically Building an Expression Tree
  • Extending LINQ
    • Custom Operators; Specialization of Existing Operators
    • Creating a Custom LINQ Provider – The IQueryable Interface; From IEnumerable to IQueryable and Back; Inside IQueryable and IQueryProvider; Writing the FlightQueryProvider
  • Parallelism and Asynchronous Processing
    • Task Parallel Library – The Parallel.For and Parallel.ForEach Methods; The Parallel.Invoke Method; The Task Class; The Task Class; Controlling Task Execution; Using Tasks for Asynchronous Operations; Concurrency Considerations
    • PLINQ – Threads Used by PLINQ; Implementing PLINQ; Consuming the Result of a PLINQ Query; Controlling Result Order in PLINQ;
    • Processing Query Results; Handling Exceptions with PLINQ; Canceling a PLINQ Query; Controlling Execution of a PLINQ Query; Changes in Data During Execution; PLINQ and Other LINQ Implementations
  • Other LINQ Implementations
    • Database Access and ORM; Data Access Without a Database; LINQ to Services; LINQ for System Engineers; Dynamic LINQ; Other LINQ Enhancements and Tools
  • LINQ in a Multitier Solution
    • Characteristics of a Multitier Solution; LINQ to SQL in a Two-Tier Solution
    • LINQ in an n-Tier Solution – Using LINQ to SQL as a DAL Replacement; Abstracting LINQ to SQL with XML External Mapping; Using LINQ to
    • SQL Through Real Abstraction; Using LINQ to XML as the Data Layer; Using LINQ to Entities as the Data Layer
    • LINQ in the Business Layer – Using LINQ to Objects to Write Better Code; IQueryable vs. IEnumberable; Identifying the Right Unit of Work; Handling Transactions; Concurrency and Thread Safety
  • LINQ Data Binding
    • Using LINQ with ASP.NET – Using LinqDataSource; Using EntityDataSource; Binding to LINQ Queries
    • Using LINQ with WPF; using LINQ with Silverlight; using LINQ with Windows Forms

Register Now