SlideShare uma empresa Scribd logo
1 de 21
devInTown Chan Ming Man C# MVP http://chanmingman.spaces.live.com Level 200
devInTown CRUD Using LINQ (Language Integrated Query) Chan Ming Man C# MVP http://chanmingman.spaces.live.com Level 200
Agenda The object model challenges the relational model What is LINQ? LINQ to SQL
Helpful Experience Visual Studio 2008 C# Express SQL Server 2005  ADO.NET
The object model challenges the relational model The relational model has been fantastically successful in a wide variety of application areas. However, it is not problem free. The problems have been made more visible by the rise in popularity of object-oriented programming languages such as C++, Java, and C#.
Data…its our job Querying and manipulating data has always been a fundamental part of our jobs as programmers Data formats change, but core needs are the same
Data Access(DBASE circa 1980s) USE empl   REPLACE ALL salary WITH (salary * 1.1) FOR supervises > 0   LIST ALL fname, lname, salary FOR Supervises > 0 Data querying and manipulation a core part of the programming model experience Certainly had limitations, but it sure was useful
But Challenges Still Remain… How to retrieve non-relational data? XML, RSS, Web Services, REST, AD, Files, etc. How to interact with plain old objects? How do you interact and query custom domain models? How to enable rich data shaping & transformations? Support flexible query composition (that is fast!) How to enable clean code in both a strongly typed and dynamic language world?
LINQ Query, Set, and Transform Operations for .NET Makes querying data a core programming concept  Works with all types and shapes of data Relational databases XML Plain old Objects Works with all .NET languages New VB and C# have integrated language support
Queries integrated with code (C#/VB) What is LINQ? Strongly-typed Benefits from IntelliSense Collections of objects Relational data XML Unified Querying Language INtegrated Queries
LINQ Architecture C# 3.0 VB 9.0 Others… .NET Language-Integrated Query (LINQ) LINQ Enabled Data Sources LINQ enabled ADO.NET LINQ  to  Entities LINQ  To SQL LINQ  to XML LINQ  To Dataset LINQ  To Objects XML Objects Relational Data 11 ©2008 Pavel Yosifovich
Where is LINQ to SQL in MVC? Model LINQ  To SQL Controller View
LINQ to SQL Application from c in db.Customers where c.City == "London" select c.CompanyName db.Customers.Add(c1); c2.City = “Seattle"; db.Customers.Remove(c3); LINQ Query Objects SubmitChanges() LINQ to SQL SQL Query Rows DML or Stored Procedures SELECT CompanyName FROM Cust WHERE City = 'London' INSERT INTO Customers… UPDATE Customers …DELETE FROM Customers … SQL Server
LINQ to SQL fully support CRUD C = Create = Insert R = Read = Select U = Update D = Delete
Create LINQ varnewCustomer = new Customer { CustomerID = "DLEAP", CompanyName = "DevLeap", Country = "Italy" }; db.Customers.InsertOnSubmit(newCustomer); SQL INSERT INTO [Customers](CustomerID, CompanyName, ...) VALUES("DLEAP", "DevLeap", ...)
Read LINQ var query = from c in Customers where c.Country == "USA" && c.State == "WA" select new {c.CustomerID, c.CompanyName, c.City }; SQL SELECT CustomerID, CompanyName, City FROM Customers WHERE Country = 'USA' AND Region = 'WA'
Update LINQ Customer cust = db.Customers.Single(p => p.CustomerID == 11111); cust.LastName = “Thomas "; db.SubmitChanges(); SQL UPDATE Customer LastName = “Thomas " SET WHERE CustomerID == 11111
Delete LINQ varoldDetail = db.Order_Details.Single( od => od.OrderID == 10422 && od.ProductID == 26); db.Order_Details.DeleteOnSubmit(oldDetail); SQL DELETE FROM [dbo].[Order Details] WHERE [OrderID] = 10422 AND [ProductID] = 26 AND ...
Demo …
Resources - LINQ MSDN Developer Center http://msdn2.microsoft.com/en-us/netframework/aa904594.aspx LINQ Forum http://forums.microsoft.com/msdn/showforum.aspx?forumid=123 Channel9 Linq Videos http://channel9.msdn.com/tags/linq Blogs Scott Guthrie  http://weblogs.asp.net/scottgu/archive/2007/04/21/new-orcas-language-feature-query-syntax.aspx Charlie Calvert  http://blogs.msdn.com/charlie/archive/2006/10/05/Links-to-LINQ.aspx LINQ HOL C# 3.0 Enhancements & LINQ (English)
© 2008 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.

Mais conteúdo relacionado

Mais procurados

Language Integrated Query - LINQ
Language Integrated Query - LINQLanguage Integrated Query - LINQ
Language Integrated Query - LINQ
Doncho Minkov
 

Mais procurados (13)

GraphQL
GraphQLGraphQL
GraphQL
 
GraphQL in an Age of REST
GraphQL in an Age of RESTGraphQL in an Age of REST
GraphQL in an Age of REST
 
GraphQL + relay
GraphQL + relayGraphQL + relay
GraphQL + relay
 
Language Integrated Query - LINQ
Language Integrated Query - LINQLanguage Integrated Query - LINQ
Language Integrated Query - LINQ
 
GraphQL With Relay Part Deux
GraphQL With Relay Part DeuxGraphQL With Relay Part Deux
GraphQL With Relay Part Deux
 
Introduction to GraphQL at API days
Introduction to GraphQL at API daysIntroduction to GraphQL at API days
Introduction to GraphQL at API days
 
GraphQL & Relay
GraphQL & RelayGraphQL & Relay
GraphQL & Relay
 
OrientDB - Voxxed Days Berlin 2016
OrientDB - Voxxed Days Berlin 2016OrientDB - Voxxed Days Berlin 2016
OrientDB - Voxxed Days Berlin 2016
 
GraphQL IndyJS April 2016
GraphQL IndyJS April 2016GraphQL IndyJS April 2016
GraphQL IndyJS April 2016
 
Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)
Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)
Introduction to GraphQL (or How I Learned to Stop Worrying about REST APIs)
 
How web works and browser works ? (behind the scenes)
How web works and browser works ? (behind the scenes)How web works and browser works ? (behind the scenes)
How web works and browser works ? (behind the scenes)
 
Linq in C# 3.0: An Overview
Linq in C# 3.0: An OverviewLinq in C# 3.0: An Overview
Linq in C# 3.0: An Overview
 
Graphql presentation
Graphql presentationGraphql presentation
Graphql presentation
 

Semelhante a Linqtosql 090629035715 Phpapp01

What's New for Data?
What's New for Data?What's New for Data?
What's New for Data?
ukdpe
 
Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan
 
RichardChauvetShortResume2015
RichardChauvetShortResume2015RichardChauvetShortResume2015
RichardChauvetShortResume2015
Richard Chauvet
 
Visual studio 2008
Visual studio 2008Visual studio 2008
Visual studio 2008
Luis Enrique
 
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
Thomas Conté
 

Semelhante a Linqtosql 090629035715 Phpapp01 (20)

B_110500002
B_110500002B_110500002
B_110500002
 
What's New for Data?
What's New for Data?What's New for Data?
What's New for Data?
 
Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2
 
Evolutionary db development
Evolutionary db development Evolutionary db development
Evolutionary db development
 
ADO.NET Entity Framework DevDays
ADO.NET Entity Framework DevDaysADO.NET Entity Framework DevDays
ADO.NET Entity Framework DevDays
 
RichardChauvetShortResume2015
RichardChauvetShortResume2015RichardChauvetShortResume2015
RichardChauvetShortResume2015
 
Entity Framework v1 and v2
Entity Framework v1 and v2Entity Framework v1 and v2
Entity Framework v1 and v2
 
MSDN Dec2007
MSDN Dec2007MSDN Dec2007
MSDN Dec2007
 
Visual studio 2008
Visual studio 2008Visual studio 2008
Visual studio 2008
 
Soprex framework on .net in action
Soprex framework on .net in actionSoprex framework on .net in action
Soprex framework on .net in action
 
LINQ to Relational in Visual Studio 2008 SP1
LINQ to Relational in Visual Studio 2008 SP1LINQ to Relational in Visual Studio 2008 SP1
LINQ to Relational in Visual Studio 2008 SP1
 
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
 
Charles harper Resume
Charles harper ResumeCharles harper Resume
Charles harper Resume
 
Resume_A_Vinod
Resume_A_VinodResume_A_Vinod
Resume_A_Vinod
 
prhresumew
prhresumewprhresumew
prhresumew
 
MilindCv2016
MilindCv2016MilindCv2016
MilindCv2016
 
Vs2008 Ms Lux
Vs2008 Ms LuxVs2008 Ms Lux
Vs2008 Ms Lux
 
Vs2008 Ms Lux
Vs2008 Ms LuxVs2008 Ms Lux
Vs2008 Ms Lux
 
Visual Studio.NET
Visual Studio.NETVisual Studio.NET
Visual Studio.NET
 
Linq
LinqLinq
Linq
 

Mais de google

Rolling Linq Wcf Silverlight Old4830
Rolling Linq Wcf Silverlight Old4830Rolling Linq Wcf Silverlight Old4830
Rolling Linq Wcf Silverlight Old4830
google
 
Linq To Sql 1221970293242272 9
Linq To Sql 1221970293242272 9Linq To Sql 1221970293242272 9
Linq To Sql 1221970293242272 9
google
 
Linq 1207579553462901 8
Linq 1207579553462901 8Linq 1207579553462901 8
Linq 1207579553462901 8
google
 
Linq E Ef 1207668728621762 9
Linq E Ef 1207668728621762 9Linq E Ef 1207668728621762 9
Linq E Ef 1207668728621762 9
google
 
Linq 1224887336792847 9
Linq 1224887336792847 9Linq 1224887336792847 9
Linq 1224887336792847 9
google
 
Linq 090701233237 Phpapp01
Linq 090701233237 Phpapp01Linq 090701233237 Phpapp01
Linq 090701233237 Phpapp01
google
 
L2s 090701234157 Phpapp02
L2s 090701234157 Phpapp02L2s 090701234157 Phpapp02
L2s 090701234157 Phpapp02
google
 
Introduccion A Linq 1205779028184546 5
Introduccion A Linq 1205779028184546 5Introduccion A Linq 1205779028184546 5
Introduccion A Linq 1205779028184546 5
google
 
Seminarv2 0 090609060123 Phpapp01
Seminarv2 0 090609060123 Phpapp01Seminarv2 0 090609060123 Phpapp01
Seminarv2 0 090609060123 Phpapp01
google
 
Linq 090611123548 Phpapp02
Linq 090611123548 Phpapp02Linq 090611123548 Phpapp02
Linq 090611123548 Phpapp02
google
 
Kdahlby 200908 Stldodn Linqinternals 090903222505 Phpapp01
Kdahlby 200908 Stldodn Linqinternals 090903222505 Phpapp01Kdahlby 200908 Stldodn Linqinternals 090903222505 Phpapp01
Kdahlby 200908 Stldodn Linqinternals 090903222505 Phpapp01
google
 

Mais de google (12)

Rolling Linq Wcf Silverlight Old4830
Rolling Linq Wcf Silverlight Old4830Rolling Linq Wcf Silverlight Old4830
Rolling Linq Wcf Silverlight Old4830
 
Linq To Sql 1221970293242272 9
Linq To Sql 1221970293242272 9Linq To Sql 1221970293242272 9
Linq To Sql 1221970293242272 9
 
Linq 1207579553462901 8
Linq 1207579553462901 8Linq 1207579553462901 8
Linq 1207579553462901 8
 
Linq E Ef 1207668728621762 9
Linq E Ef 1207668728621762 9Linq E Ef 1207668728621762 9
Linq E Ef 1207668728621762 9
 
Linq 1224887336792847 9
Linq 1224887336792847 9Linq 1224887336792847 9
Linq 1224887336792847 9
 
Linq 090701233237 Phpapp01
Linq 090701233237 Phpapp01Linq 090701233237 Phpapp01
Linq 090701233237 Phpapp01
 
L2s 090701234157 Phpapp02
L2s 090701234157 Phpapp02L2s 090701234157 Phpapp02
L2s 090701234157 Phpapp02
 
Introduccion A Linq 1205779028184546 5
Introduccion A Linq 1205779028184546 5Introduccion A Linq 1205779028184546 5
Introduccion A Linq 1205779028184546 5
 
Seminarv2 0 090609060123 Phpapp01
Seminarv2 0 090609060123 Phpapp01Seminarv2 0 090609060123 Phpapp01
Seminarv2 0 090609060123 Phpapp01
 
Linq 090611123548 Phpapp02
Linq 090611123548 Phpapp02Linq 090611123548 Phpapp02
Linq 090611123548 Phpapp02
 
Kdahlby 200908 Stldodn Linqinternals 090903222505 Phpapp01
Kdahlby 200908 Stldodn Linqinternals 090903222505 Phpapp01Kdahlby 200908 Stldodn Linqinternals 090903222505 Phpapp01
Kdahlby 200908 Stldodn Linqinternals 090903222505 Phpapp01
 
Linq
LinqLinq
Linq
 

Último

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Último (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 

Linqtosql 090629035715 Phpapp01

  • 1. devInTown Chan Ming Man C# MVP http://chanmingman.spaces.live.com Level 200
  • 2. devInTown CRUD Using LINQ (Language Integrated Query) Chan Ming Man C# MVP http://chanmingman.spaces.live.com Level 200
  • 3. Agenda The object model challenges the relational model What is LINQ? LINQ to SQL
  • 4. Helpful Experience Visual Studio 2008 C# Express SQL Server 2005 ADO.NET
  • 5. The object model challenges the relational model The relational model has been fantastically successful in a wide variety of application areas. However, it is not problem free. The problems have been made more visible by the rise in popularity of object-oriented programming languages such as C++, Java, and C#.
  • 6. Data…its our job Querying and manipulating data has always been a fundamental part of our jobs as programmers Data formats change, but core needs are the same
  • 7. Data Access(DBASE circa 1980s) USE empl REPLACE ALL salary WITH (salary * 1.1) FOR supervises > 0 LIST ALL fname, lname, salary FOR Supervises > 0 Data querying and manipulation a core part of the programming model experience Certainly had limitations, but it sure was useful
  • 8. But Challenges Still Remain… How to retrieve non-relational data? XML, RSS, Web Services, REST, AD, Files, etc. How to interact with plain old objects? How do you interact and query custom domain models? How to enable rich data shaping & transformations? Support flexible query composition (that is fast!) How to enable clean code in both a strongly typed and dynamic language world?
  • 9. LINQ Query, Set, and Transform Operations for .NET Makes querying data a core programming concept Works with all types and shapes of data Relational databases XML Plain old Objects Works with all .NET languages New VB and C# have integrated language support
  • 10. Queries integrated with code (C#/VB) What is LINQ? Strongly-typed Benefits from IntelliSense Collections of objects Relational data XML Unified Querying Language INtegrated Queries
  • 11. LINQ Architecture C# 3.0 VB 9.0 Others… .NET Language-Integrated Query (LINQ) LINQ Enabled Data Sources LINQ enabled ADO.NET LINQ to Entities LINQ To SQL LINQ to XML LINQ To Dataset LINQ To Objects XML Objects Relational Data 11 ©2008 Pavel Yosifovich
  • 12. Where is LINQ to SQL in MVC? Model LINQ To SQL Controller View
  • 13. LINQ to SQL Application from c in db.Customers where c.City == "London" select c.CompanyName db.Customers.Add(c1); c2.City = “Seattle"; db.Customers.Remove(c3); LINQ Query Objects SubmitChanges() LINQ to SQL SQL Query Rows DML or Stored Procedures SELECT CompanyName FROM Cust WHERE City = 'London' INSERT INTO Customers… UPDATE Customers …DELETE FROM Customers … SQL Server
  • 14. LINQ to SQL fully support CRUD C = Create = Insert R = Read = Select U = Update D = Delete
  • 15. Create LINQ varnewCustomer = new Customer { CustomerID = "DLEAP", CompanyName = "DevLeap", Country = "Italy" }; db.Customers.InsertOnSubmit(newCustomer); SQL INSERT INTO [Customers](CustomerID, CompanyName, ...) VALUES("DLEAP", "DevLeap", ...)
  • 16. Read LINQ var query = from c in Customers where c.Country == "USA" && c.State == "WA" select new {c.CustomerID, c.CompanyName, c.City }; SQL SELECT CustomerID, CompanyName, City FROM Customers WHERE Country = 'USA' AND Region = 'WA'
  • 17. Update LINQ Customer cust = db.Customers.Single(p => p.CustomerID == 11111); cust.LastName = “Thomas "; db.SubmitChanges(); SQL UPDATE Customer LastName = “Thomas " SET WHERE CustomerID == 11111
  • 18. Delete LINQ varoldDetail = db.Order_Details.Single( od => od.OrderID == 10422 && od.ProductID == 26); db.Order_Details.DeleteOnSubmit(oldDetail); SQL DELETE FROM [dbo].[Order Details] WHERE [OrderID] = 10422 AND [ProductID] = 26 AND ...
  • 20. Resources - LINQ MSDN Developer Center http://msdn2.microsoft.com/en-us/netframework/aa904594.aspx LINQ Forum http://forums.microsoft.com/msdn/showforum.aspx?forumid=123 Channel9 Linq Videos http://channel9.msdn.com/tags/linq Blogs Scott Guthrie http://weblogs.asp.net/scottgu/archive/2007/04/21/new-orcas-language-feature-query-syntax.aspx Charlie Calvert http://blogs.msdn.com/charlie/archive/2006/10/05/Links-to-LINQ.aspx LINQ HOL C# 3.0 Enhancements & LINQ (English)
  • 21. © 2008 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.