• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Linq view part1
 

Linq view part1

on

  • 1,304 views

The first part of a series of workshops about linq.

The first part of a series of workshops about linq.

Statistics

Views

Total Views
1,304
Views on SlideShare
1,304
Embed Views
0

Actions

Likes
0
Downloads
10
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Linq view part1 Linq view part1 Presentation Transcript

    • Microsoft LinqInsightspart 1
      A tech overview
      Alexandre Marreiros, 2011
    • Agenda
      Alexandre Marreiros, 2011
      Using LINQ
      References
      Contacts
      Pre-Requirements
      Introduction
      LINQ Principles
      Query
    • Introduction
      Alexandre Marreiros, 2011
      Linq acronym for: Language Integrated Query
      It extends .NET to access Data in a easy and integrated way to CLI Languages.
      Almost anything can be a DataSource to Linq.
      Data Sources
      Linq
      .Net Framework
      WPF
      WCF
      WWF
      WPF
      .Net Framework
    • Introduction
      LINQ extends CLI languages with the power to querying data, directly.
      Avaiable to VB.net and C#.
      .NET Standard to query multiple data sources.
      Declarative style of programming.
      Support for multithread programming.
      Alexandre Marreiros, 2011
    • Introduction
      Alexandre Marreiros, 2011
    • Demo
      Alexandre Marreiros, 2011
      Presenting Query expression, LINQ to Object and LINQ to SQL
    • LINQ Principles
      Alexandre Marreiros, 2011
      LINQ key Ideas are:
      Integrated;
      Declarative;
      Unitive;
      Extendable;
      Hierarchical;
      Composable;
    • LINQ Principles
      Alexandre Marreiros, 2011
      Integrated
      One of the main goals of LINQ is to integrate a flexible query sintax in to .NET languages.
      Querying data in .net can be confused and tricky theres an example:
      SqlConnection connection = new SqlConnection(connectionString);
      connection.Open();
      System.Data.SqlClient.SqlCommand sqlCommand = new SqlCommand();
      sqlCommand.Connection = connection;
      sqlCommand.CommandText = "Select * from Customer";
      sqlCommand.ExecuteReader(CommandBehavior.CloseConnection);
    • LINQ Principles
      Alexandre Marreiros, 2011
      Integrated
      LINQ offers a mutch more integrated mode and code cust effective.
      Querying in LINQ:
      Contacts DB = new Contacts(@c:Contacts.mdf);
      var query = from contact in DB.Contacts;
      select c;
    • LINQ Principles
      Alexandre Marreiros, 2011
      Unitive
      Without LINQ a data driven programs will have in the same code a mix off different technologies
      Just LINQ
      Just #
      SQL
      C#
      And, OR
      XML
      Parsing
      C#
    • LINQ Principles
      Alexandre Marreiros, 2011
      Extendable
      LINQ is a technologie based in providers.
      You Can extend LINQ Implementing new Providers.
      All providers are adressed with the same syntax.
    • LINQ Principles
      Alexandre Marreiros, 2011
      Declarative
      varqueryNames = from realNamein names
      where realName != ""
      select realName;
      Focus in What You Want
      Not In How you do
    • LINQ Principles
      Alexandre Marreiros, 2011
      Hierarchical
    • LINQ Principles
      Alexandre Marreiros, 2011
      Composable
      Query can be composed from other queties
    • Demo
      Alexandre Marreiros, 2011
      A FewqueryExamplesmadefromtheroots
    • Using Linq
      Use Linq to easy query datasources as databases, object collections, XML, Excel Files and others.
      Extend Linq to support aditional datasources.
      In database or business service Layers use Linq to reduce Complexity.
      Don´t throw away ADO.NET in data relational database think if he can be a best Aproach.
      Alexandre Marreiros, 2011
    • Commingnext
      NowthatwealreadyunderstandWhat´s LINQ inthenextpartwewillseehow to use thedifferent LINQ model’s.
      (LINQ to SQL, LINQ to XML, LINQ to Object,How to extend LINQ, LINQ to Sharepoint)
      Alexandre Marreiros, 2011
    • Alexandre Marreiros, 2011
      References
      http://msdn.microsoft.com/en-us/netframework/aa904594Http://download.microsoft.com/download/4/7/0/4703eba2-78c4-4b09-8912-69f6c38d3a56/LINQ.wmvLinq in Action – Fabrice MargueirePro Linq Language integrated query 2010 in c# 2010 – Joseph C. RattzProgramming Microsoft ASP.NET 3.5 – Dino Esposito
    • Contacts
      Alexandre Marreiros, 2011
      Email: Amarreiros@gmail.com
      Twitter: @alexmarreiros
      Feel free to ask