Language Integrated Query (LINQ), Leren programmeren in LINQ |
Language Integrated Query (LINQ), Leren programmeren in LINQ |
Apr 9 2009, 08:20
Post
#1
|
|
Advanced Member Group: Members Posts: 3,005 Joined: 11-September 07 Member No.: 2 |
Wow, programmeren in LINQ doe je niet zomaar even!
Daarom heb ik besloten om mij hier wat meer in te verdiepen. In dit topic zal ik nuttige resources (en code voorbeelden) verzamelen. Online Resources: - http://weblogs.asp.net/zeeshanhirani/default.aspx |
|
|
Apr 9 2009, 08:25
Post
#2
|
|
Advanced Member Group: Members Posts: 3,005 Joined: 11-September 07 Member No.: 2 |
SelectMany Operator:
CodeThinked: The Linq SelectMany Operator: QUOTE The Linq SelectMany Operator http://www.codethinked.com/post/2008/05/Th...y-operator.aspxPosted on 5/8/2008 4:20:33 PM by Justin Etheredge Most of you by now are familiar with LINQ, Microsoft's foray into crossing the code/data impedance mismatch. Most of what we see in Linq translates directly into our knowledge of SQL, since most LINQ queries use very similar semantics to SQL queries. There are certain operators though that don't look familiar because they either weren't present in our SQL lexicon or they were represented in a fundamentally different way. A little bit back I posted about one of these operators, the "let" operator, and how to use it effectively. I later followed it up with a post that dug a little bit deeper into the "let" operator so that you could get a peek at what was going on behind the scenes. Zeeshan Hirani: Select Many Operator Part 1 QUOTE Select Many Operator is part of the projection query operator supported by linq. SelectMany operator is mainly used for flattening out the hierarchy of collections into one single collection of objects. It merges each item into a single sequence that gets returned by the query results. Here is the prototype for SelectMany operator public static IEnumerable<S> SelectMany<T, S>( this IEnumerable<T> source, Func<T, IEnumerable<S>> selector); http://weblogs.asp.net/zeeshanhirani/archi...tor-part-1.aspx |
|
|
Apr 9 2009, 08:28
Post
#3
|
|
Advanced Member Group: Members Posts: 3,005 Joined: 11-September 07 Member No.: 2 |
LINQ to SQL
LINQ to SQL - 5 Minute Overview: QUOTE LINQ to SQL allows .NET developers to write “queries†in their .NET language of choice to retrieve and manipulate data from a SQL Server database. In a general sense, LINQ to SQL allows us to create SQL queries in our preferred .NET language syntax and work with a strongly types collection of objects as a return result. We can make changes to these objects then save changes back to the database. http://www.hookedonlinq.com/LINQtoSQL5MinuteOverview.ashxTo get an idea of the syntax for LINQ to SQL, we will be using the following SQL database schema. It is a simple software registration and helpdesk. It is populated with sample data and has foreign-key relationships defined where appropriate. Nuttig artikel! Using LINQ to SQL (Part 1): QUOTE LINQ to SQL is an O/RM (object relational mapping) implementation that ships in the .NET Framework "Orcas" release, and which allows you to model a relational database using .NET classes. You can then query the database using LINQ, as well as update/insert/delete data from it. LINQ to SQL fully supports transactions, views, and stored procedures. It also provides an easy way to integrate data validation and business logic rules into your data model. http://weblogs.asp.net/scottgu/archive/200...sql-part-1.aspx More resources: - http://davidhayden.com/blog/dave/archive/2...erDatabase.aspx - http://blogs.msdn.com/charlie/archive/2006...d-distinct.aspx |
|
|
Lo-Fi Version | Time is now: 1st November 2024 - 18:24 |