linq e ef

Post on 10-May-2015

3.676 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Slide dell'evento di Perugia su LINQ e ADO.NET Entity Framework

TRANSCRIPT

Pietro BrambatiMicrosoftblogs.msdn.com/pietrobr

{ { LINQ LINQ && ADO.NET Entity ADO.NET Entity FrameworkFramework}}

C# 3.0C# 3.0C# 3.0C# 3.0 VB 9VB 9VB 9VB 9

.NET Language Integrated Query.NET Language Integrated Query

LINQ LINQ toto

ObjeObjectscts

LINQ LINQ toto

ObjeObjectscts

LINQ LINQ toto

DataDataSetsSets

LINQ LINQ toto

DataDataSetsSets

LINQ LINQ toto

SQLSQL

LINQ LINQ toto

SQLSQL

LINQ LINQ toto

XMLXML

LINQ LINQ toto

XMLXML

oggettioggetti

<book> <title/> <author/> <year/> <price/></book>

XMXMLL

Mondo Mondo relazionarelaziona

lele

ApplicazionApplicazionee

LINQ to SQLLINQ to SQL

from c in db.Customerswhere c.City == "London"select c.CompanyName

EnumeratEnumeratee

SELECT CompanyNameFROM CustomerWHERE City = 'London'

SQL QuerySQL Queryo SProco SProc

RowsRows

OggettiOggetti

db.Customers.Add(c1);c2.City = “Perugia";db.Customers.Remove(c3);

SubmitChanges()SubmitChanges()

INSERT INTO Customer …UPDATE Customer …DELETE FROM Customer …

DML DML o SProcso SProcs

• Dati == Oggetti

• Imperativo Dichiarativo

• Per oggetti, XML e Dati relazionali

• LINQ to * : un approccio unificato per l’accesso a sorgenti dati eterogenee

• ADO.NET EF: il modello concettuale per sviluppare… • LINQ to Entites : LINQ per EF• LINQ to SQL e LINQ to Entities sono pensati per diversi

scenari

© 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after

the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Pietro BrambatiMicrosoftblogs.msdn.com/pietrobr

top related