Download presentation
Presentation is loading. Please wait.
Published byWillie Carmen Modified over 9 years ago
2
Linq to SQL Chalk Talk Freek Leemhuis Rob Huibers Logica
3
LINQ Bestaat uit taal uitbreidingen in C# 3.0 en VB 9.0 Uitbreidbaar door LINQ providers voor externe data formaten (bijvoorbeeld MS SQL Server). LINQ to SQL Een framework(OR mapper) voor het mappen van data classes op SQL Server tables, views en stored procedures.
4
Taaluitbreidingen Linq keywords Extension methods Partial Methods Lambda expressions Anonymous types Object initializers Local variable inference
5
LINQ parts C# 3.0C# 3.0 VB 9.0VB 9.0 OthersOthers LINQLINQ Interne query engine LINQ to Objects.Net APIs LINQ to Datasets LINQ to XML Providers LINQ to SQL LINQ to Entities IQueryableIEnumerable
6
Object Relational Mapping Objecten Objects != Data Relationele Data
7
LINQ to SQL Architectuur from c in Context.Customers Where c.LastName. StartsWith(“Niks”) select new { c.Name, c.FirstName}; from c in Context.Customers Where c.LastName. StartsWith(“Niks”) select new { c.Name, c.FirstName}; select Name, FirstName from customers where Lastname like ‘Niks%' Services: - Change tracking - Concurrency control - Object identity LINQ to SQL DataContext SQL Server Customer c = new Customer(); Customer.LastName = “Bos”; Customers.InsertOnSumbit(c); Context.SubmitChanges(); Dynamische SQL of Stored Procedure ApplicatieApplicatie
8
Het ADO.Net Entity Framework Conceptual Mapping Logica l Object Model Relational Data Entity Table CSDLMSLSSDL Table
9
LINQ to SQL versus Entity Framework
10
Linq to SQL in N-tier Architectuur
11
Resources Starten met Linq http://msdn2.microsoft.com/en-us/library/bb308961.aspx http://www.asp.net/learn/linq-videos/ http://weblogs.asp.net/scottgu/archive/tags/LINQ/ http://www.hookedonlinq.com/ http://msdn2.microsoft.com/en-us/vcsharp/aa336746.aspx Linq ninjas http://blogs.msdn.com/mattwar/default.aspx http://weblogs.asp.net/fbouma http://codebetter.com/blogs/ian_cooper/ http://mtaulty.com LINQPad http://www.linqpad.net/
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.