0
Microsoft LinqInsightspart 1<br />A  tech overview <br />Alexandre Marreiros, 2011<br />
Agenda<br />Alexandre Marreiros, 2011<br />Using LINQ<br />References<br />Contacts<br />Pre-Requirements<br />Introductio...
Introduction<br />Alexandre Marreiros, 2011<br />Linq acronym for: Language Integrated Query<br />It extends .NET to acces...
Introduction<br />LINQ extends CLI languages with the power to querying data, directly. <br />Avaiable to VB.net and C#.<b...
Introduction<br />Alexandre Marreiros, 2011<br />
Demo<br />Alexandre Marreiros, 2011<br />Presenting Query expression, LINQ to Object and LINQ to SQL<br />
LINQ Principles <br />Alexandre Marreiros, 2011<br />LINQ key Ideas are:<br />Integrated;<br />Declarative;<br />Unitive;<...
LINQ Principles <br />Alexandre Marreiros, 2011<br />Integrated<br />One of the main goals of LINQ is to integrate a flexi...
LINQ Principles <br />Alexandre Marreiros, 2011<br />Integrated<br />LINQ offers a mutch more integrated mode and code cus...
LINQ Principles <br />Alexandre Marreiros, 2011<br />Unitive<br />Without LINQ a data driven programs will have in the sam...
LINQ Principles <br />Alexandre Marreiros, 2011<br />Extendable<br />LINQ is a technologie based in providers.<br />You Ca...
LINQ Principles <br />Alexandre Marreiros, 2011<br />Declarative<br />varqueryNames = from realNamein names <br />		 where...
LINQ Principles <br />Alexandre Marreiros, 2011<br />Hierarchical<br />
LINQ Principles <br />Alexandre Marreiros, 2011<br />Composable<br />Query can be composed from other queties<br />
Demo<br />Alexandre Marreiros, 2011<br />A FewqueryExamplesmadefromtheroots<br />
Using Linq<br />Use Linq to easy query datasources as databases, object collections, XML, Excel Files and others.<br />Ext...
Commingnext<br />NowthatwealreadyunderstandWhat´s LINQ inthenextpartwewillseehow to use thedifferent LINQ model’s.<br />(L...
Alexandre Marreiros, 2011<br />References <br />http://msdn.microsoft.com/en-us/netframework/aa904594Http://download.mic...
Contacts<br />Alexandre Marreiros, 2011<br />Email: Amarreiros@gmail.com<br />Twitter: @alexmarreiros<br />Feel free to as...
Upcoming SlideShare
Loading in...5
×

Linq view part1

1,078

Published on

The first part of a series of workshops about linq.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,078
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Linq view part1"

  1. 1. Microsoft LinqInsightspart 1<br />A tech overview <br />Alexandre Marreiros, 2011<br />
  2. 2. Agenda<br />Alexandre Marreiros, 2011<br />Using LINQ<br />References<br />Contacts<br />Pre-Requirements<br />Introduction<br />LINQ Principles<br />Query<br />
  3. 3. Introduction<br />Alexandre Marreiros, 2011<br />Linq acronym for: Language Integrated Query<br />It extends .NET to access Data in a easy and integrated way to CLI Languages.<br /> Almost anything can be a DataSource to Linq.<br />Data Sources<br />Linq<br />.Net Framework<br /> WPF<br />WCF<br /> WWF<br /> WPF<br />.Net Framework<br />
  4. 4. Introduction<br />LINQ extends CLI languages with the power to querying data, directly. <br />Avaiable to VB.net and C#.<br />.NET Standard to query multiple data sources.<br />Declarative style of programming.<br />Support for multithread programming.<br />Alexandre Marreiros, 2011<br />
  5. 5. Introduction<br />Alexandre Marreiros, 2011<br />
  6. 6. Demo<br />Alexandre Marreiros, 2011<br />Presenting Query expression, LINQ to Object and LINQ to SQL<br />
  7. 7. LINQ Principles <br />Alexandre Marreiros, 2011<br />LINQ key Ideas are:<br />Integrated;<br />Declarative;<br />Unitive;<br />Extendable;<br />Hierarchical;<br />Composable;<br />
  8. 8. LINQ Principles <br />Alexandre Marreiros, 2011<br />Integrated<br />One of the main goals of LINQ is to integrate a flexible query sintax in to .NET languages. <br />Querying data in .net can be confused and tricky theres an example:<br />SqlConnection connection = new SqlConnection(connectionString);<br />connection.Open();<br />System.Data.SqlClient.SqlCommand sqlCommand = new SqlCommand();<br />sqlCommand.Connection = connection;<br />sqlCommand.CommandText = "Select * from Customer";<br />sqlCommand.ExecuteReader(CommandBehavior.CloseConnection);<br />
  9. 9. LINQ Principles <br />Alexandre Marreiros, 2011<br />Integrated<br />LINQ offers a mutch more integrated mode and code cust effective.<br />Querying in LINQ:<br />Contacts DB = new Contacts(@c:Contacts.mdf);<br />var query = from contact in DB.Contacts;<br /> select c;<br />
  10. 10. LINQ Principles <br />Alexandre Marreiros, 2011<br />Unitive<br />Without LINQ a data driven programs will have in the same code a mix off different technologies<br />Just LINQ<br />Just #<br />SQL<br />C#<br />And, OR<br />XML<br />Parsing<br />C#<br />
  11. 11. LINQ Principles <br />Alexandre Marreiros, 2011<br />Extendable<br />LINQ is a technologie based in providers.<br />You Can extend LINQ Implementing new Providers. <br />All providers are adressed with the same syntax.<br />
  12. 12. LINQ Principles <br />Alexandre Marreiros, 2011<br />Declarative<br />varqueryNames = from realNamein names <br /> where realName != "" <br /> select realName;<br />Focus in What You Want<br />Not In How you do <br />
  13. 13. LINQ Principles <br />Alexandre Marreiros, 2011<br />Hierarchical<br />
  14. 14. LINQ Principles <br />Alexandre Marreiros, 2011<br />Composable<br />Query can be composed from other queties<br />
  15. 15. Demo<br />Alexandre Marreiros, 2011<br />A FewqueryExamplesmadefromtheroots<br />
  16. 16. Using Linq<br />Use Linq to easy query datasources as databases, object collections, XML, Excel Files and others.<br />Extend Linq to support aditional datasources.<br />In database or business service Layers use Linq to reduce Complexity.<br />Don´t throw away ADO.NET in data relational database think if he can be a best Aproach.<br />Alexandre Marreiros, 2011<br />
  17. 17. Commingnext<br />NowthatwealreadyunderstandWhat´s LINQ inthenextpartwewillseehow to use thedifferent LINQ model’s.<br />(LINQ to SQL, LINQ to XML, LINQ to Object,How to extend LINQ, LINQ to Sharepoint)<br />Alexandre Marreiros, 2011<br />
  18. 18. Alexandre Marreiros, 2011<br />References <br />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<br />
  19. 19. Contacts<br />Alexandre Marreiros, 2011<br />Email: Amarreiros@gmail.com<br />Twitter: @alexmarreiros<br />Feel free to ask<br />
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×