Language Integrated Query (LINQ)

Slides:



Advertisements
Similar presentations
Svetlin Nakov Director Training and Consulting Activities National Academy for Software Development (NASD) ASP.NET 3.5 New Features.
Advertisements

The Microsoft Technical Roadshow 2007 Language Enhancements and LINQ Daniel Moth Developer & Platform Group Microsoft Ltd
Language Integrated Query (LINQ) Martin Parry Developer & Platform Group Microsoft Ltd
ADO vs ADO.NET ADOADO.NET Client/server coupledDisconnected collection of data from data server Uses RECORDSET object (contains one table) Uses DATASET.
Michael Pizzo Software Architect Data Programmability Microsoft Corporation.
Linq to SQL Chalk Talk Freek Leemhuis Rob Huibers Logica.
Shyam Pather Development Manager Microsoft Session Code: DTL402.
.NET 3.5 – Mysteries. NetFx Evolution NetFx 1.0 C# 1.0, VB 7.0, VS.NET NetFx 1.1 C# 1.1, VB 7.1, VS 2003 NetFx 2.0 C# 2.0, VB 8.0, VS 2005 NetFx 3.0 C#
© Logica All rights reserved ADO vNext LINQ LINQ to SQL Entity Framework Freek Leemhuis
C#/.NET 5/4/ Ian Cooper
ASP.NET 3.5 New Features. 2 Agenda What's New in.NET Framework 3.5? Visual Studio 2008 Enhancements LINQ (Language Integrated Query) New ASP.NET Server.
ASP.NET 3.5 Mike Ormond Developer & Platform Group Microsoft Ltd
LinqToSharePoint SandBoxed Solution Shakir Majeed Khan
.NET Framework V3.5+ & RESTful web services Mike Taulty Developer & Platform Group Microsoft Ltd
Visual Studio 2008 and ASP.NET 3.5 Mike Ormond Developer & Platform Group Microsoft Ltd
What’s new in ASP.NET 3.5? Mike Ormond Developer & Platform Group Microsoft Ltd
© Copyright SELA Software & Education Labs Ltd Baruch Hirsch St. Bnei Brak Israel Microsoft Entity Framework v1.1 over Oracle Database Erez.
What’s new for Rich Clients? Martin Parry Developer & Platform Group Microsoft Ltd
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
A tour of new features introducing LINQ. Agenda of LINQ Presentation We have features for every step of the way LINQ Fundamentals Anonymous Functions/Lambda.
A tour of Visual Studio 2008 and the.NET Framework v3.5 Daniel Moth Developer & Platform Group Microsoft
LINQ Programming in C# LINQ CSE Prof. Roger Crawfis.
 Introduction  What is LINQ  Syntax  How to Query  Example Program.
Eric Vogel Software Developer A.J. Boggs & Company.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Entity Framework MIS 324 MIS 324 Professor Sandvig Professor Sandvig.
ADO.NET ENTITY FRAMEWORK Mike Taulty Developer & Platform Group Microsoft UK
ADO.NET DATA SERVICES Mike Taulty Developer & Platform Group Microsoft UK
Putting it all together: LINQ as an Example. The Problem: SQL in Code Programs often connect to database servers. Database servers only “speak” SQL. Programs.
LINQ TO XML Mike Taulty Developer & Platform Group Microsoft UK
Introduction to LINQ Lecture # 19 August Introduction How do you interrogate/manipulate data? What if you could do the work in a type-safe," string-free.
LINQ and C# 3.0 Mads Torgersen Program Manager for the C# Language Microsoft Corporation.
LINQ: It’s Not Your Father’s Data Access Denny Boynton Anheuser-Busch Companies.
The.NET Language Integrated Query Project Anders Hejlsberg TLN306 Technical Fellow Microsoft Corporation.
ADO.NET Entity Framework Mike Taulty Developer & Platform Group Microsoft Ltd
Visual Studio “Orcas” &.NET Framework v3.5 Mike Taulty, Daniel Moth Developer & Platform Group Microsoft Ltd
Overview of Silverlight Mike Taulty Developer & Platform Group Microsoft Ltd
Oct * Brad Tutterow. VS 2008.NET 3.5LINQ Entity Framework  The ADO.NET Entity Framework is part of Microsoft’s next generation of.NET technologies.
C# 3.0 and LINQ Pavel Yosifovich CTO, Hi-Tech College
Microsoft TechDayshttp:// Роман Здебский Эксперт по технологиям разработки ПО Microsoft
AUC Technologies LINQ (Language Integrated Query) LINQ Presented By : SHAIKH SHARYAR JAVED Software Engineer (Daedalus Software Inc.) Technology Teacher.
By: Luis Carranco CIS764 - Fall  What is LINQ  Architecture  How does it work?  Samples/Demo  Why to use LINQ? 2.
C#: Future Directions in Language Innovation Anders Hejlsberg TLN307 Technical Fellow Microsoft Corporation.
1 ADO.NET Data Services Mike Taulty Developer & Platform Group Microsoft Ltd
Applied Linq Putting Linq to work Introducing… Class-A Kennisprovider Microsoft development Training Coaching Alex Thissen Trainer/coach.
CHARLES UNIVERSITY IN PRAGUE faculty of mathematics and physics Advanced.NET Programming I 10 th Lecture Pavel Ježek
Satisfy Your Technical Curiosity C# 3.0 Raj Pai Group Program Manager Microsoft Corporation
Joel Pobar Language Geek Microsoft DEV320 Improve on C# % Backwards Compatible Language Integrated Query (LINQ)
LINQ Language Integrated Query LINQ1. LINQ: Why and what? Problem Many data sources: Relational databases, XML, in-memory data structures, objects, etc.
Ken Casada Developer Evangelist Microsoft Switzerland
Language Integrated Query Mike Taulty Developer & Platform Group Microsoft Ltd
Luke Hoban Senior Program Manager Microsoft Session Code: DTL319.
Building Complete Web Application Using ASP.NET 3.5 & Visual Studio 2008 Omar Khan Group Program Manager Visual Studio.
Building Complete Web Application Using ASP.NET 3.5 & Visual Studio 2008 Omar Khan Group Program Manager Visual Studio.
Part 1: Overview of LINQ Intro to LINQ Presenter: PhuongNQK.
LINQ for SQL SQL Saturday May 2009 David Fekke.
Language Integrated Query: (LINQ) An introduction
LiNQ SQL Saturday David Fekke.
ASP.NET 3.5 Mike Ormond Developer & Platform Group Microsoft Ltd
ADO.NET Entity Framework
ADO.NEXT Advances in Data Access for 2008
Visual Studio “Orcas” & .NET Framework v3.5
Visual Studio 2008 Mike Taulty Developer & Platform Group
Advances for Data in VS “Orcas”
Advances for Data in VS “Orcas”
Технологии доступа к данным на платформе Microsoft.NET
LINQ - 2 Ravi Kumar C++/C# Team.
Visual Studio 2008.
.NET Framework V3.5+ & RESTful web services
CS4540 Special Topics in Web Development LINQ to Objects
Presentation transcript:

Language Integrated Query (LINQ) Martin Parry Developer & Platform Group Microsoft Ltd martin.parry@microsoft.com http://www.martinparry.com

Introduction We use many different types of query SQL, XQuery/XPath, DataView row filters, etc. Maybe we could enhance productivity by... Deciding on one query expression syntax Enabling compilers to check queries & results Allow extensibility to target all kinds of data

Agenda C#3 and VB9 Language Enhancements LINQ to XML LINQ to SQL Building to LINQ to Objects LINQ to XML LINQ to SQL LINQ to DataSets

C#3 and VB9 Ship with Visual Studio 2008 Contain language features that enable LINQ Necessary for LINQ, but not sufficient... Also need .NET FX 3.5 Contains a lot of new classes that make LINQ work – we’ll see some later

New Language Features – LINQ to objects

Local variable type inference Language Innovations Query expressions var contacts = from c in customers where c.City == "Hove" select new { c.Name, c.Phone }; Local variable type inference Lambda expressions var contacts = customers .Where(c => c.City == "Hove") .Select(c => new { c.Name, c.Phone }); Extension methods Object initializers Anonymous types

LINQ to XML

LINQ to XML Creating XML Querying Xml Namespaces Constructors lend themselves to nesting Can use LINQ (over anything) to build XML Querying Use normal axes from XML infoset Get full power of query expressions over XML Select, where, group by, etc. Xml Namespaces

LINQ to SQL

LINQ to SQL DataContext is the central class Use code-gen for ORM SQL is only submitted when needed Parent-child relationships are respected Control of deferred loading Can insert/update/delete Transactionally, with concurrency checks

LINQ to DataSet

LINQ to DataSet Query expressions over in-memory data Works with untyped or typed DataSets If query returns some kind of DataRow: - Can yield results as a DataView ...and therefore databind to those results

That’s LINQ A combination of new language features, and new fx3.5 classes (with extension methods) A common query expression syntax Freedom to implement across different kinds of data It’s TYPED... The compiler can check your queries The compiler can check your results

For more information Today’s sample code via http://www.martinparry.com MSDN Nuggets by Mike Taulty http://www.microsoft.com/uk/msdn/nuggets

MSDN in the UK Visit http://msdn.co.uk Newsletter Events Nugget Videos Blogs There are many more things that we might promote here, examples; Dev Centres Security Centre (specifically) Topical Events such as TechEd, PDC and so on Success Builder And many more – I’ve cut the list short for brevity.