background preloader


Facebook Twitter

LINQ over C# project. Genome > Home. Linq.js - LINQ for JavaScript. Zip operator in Linq with .NET 4.0 - DotNetJaps. Microsoft .NET framework 4.0 is having many features that make developers life very easy. Its also provides some enhancement to Linq also. I just found a great operator called Zip which merge the sequence of two entities. Here is the explanation of Zip Operator from MSDN. “The method merges each element of the first sequence with an element that has the same index in the second sequence. If the sequences do not have the same number of elements, the method merges sequences until it reaches the end of one of them”.

Here is the simple console application for the zip. C# 4.0 in a Nutshell - LINQBridge. LINQBridge You might already have discovered that LINQ is addictive: once you're accustomed to solving problems through slick functional queries, it really hurts being forced back to the imperative style of C# 2.0!

C# 4.0 in a Nutshell - LINQBridge

LINQ's query operators are implemented from .NET Framework 3.5. SP 2010: Getting started with LINQ to SharePoint in SharePoint 2010 - Tobias Zimmergren's thoughts on development. Author: Tobias Zimmergren | | @zimmergren In SharePoint 2010 you now have the ability to use LINQ syntax to fetch items from your lists instead of using the "traditional" approach of CAML queries.

SP 2010: Getting started with LINQ to SharePoint in SharePoint 2010 - Tobias Zimmergren's thoughts on development

(Including SPSiteDataQuery and SPQuery objects) LINQ to SharePoint. i4o - Indexed LINQ. Specifications in C# 3.0 - Windows Live. This is the last of my posts on LINQ before switching over to Beta2; I’m playing catch-up but be aware that some things will have changed.

Specifications in C# 3.0 - Windows Live

I will post any changes for Beta 2 to both this and Being Ignorant in LINQ to SQL as time permits. What are Specifications? Specification is a design pattern authored by Martin Fowler and Eric Evans. If you are not familiar with specifications then you can read more about them in Eric Evans book Domain Driven Design, or just read this comprehensive paper. If you are not sure what Specifications are, you might want to read that before you read this. Instead of writing: customer.IsInSalesRegion("London"); Kirk Evans Blog : Calling SharePoint Lists Web Service Using WCF. Download details: ADO.NET vNext CTP, August 2006.

LINQ provider basics. Learn how to create custom LINQ providers.

LINQ provider basics

Introduction LINQ (Language Integrated Query) works as a middle tier between data store and the language environment. From a developer's point of view, it is just a new pattern for querying data from multiple data structures directly in the IDE. Behind the scenes it does a whole lot of tasks like expression processing, validation and calling the right routine to fetch data or build a query to run in SQL Server.

In short, LINQ stands as common query gateway between the language and the data store. LINQ to SQL Extension: Batch Deletion with Lamb... Batch deletion in the O/R Mapping frameworks is always depressing.

LINQ to SQL Extension: Batch Deletion with Lamb...

We need to query all the entities we want to delete from the database, pass them to the DeleteOnSubmit or DeleteAllOnSubmit methods of DataContext, and finally invoke SubmitChanges to delete the records form database. In this case, we will cost an additional query and send lots of "DELETE" commands to database. How wasteful! LINQ & Reflection in C# 3.0 « The Wandering Gli... I posted an article the other day showing you how to exploit the query capabilities of LINQ to do reflection over the attributes on a C# class.

LINQ & Reflection in C# 3.0 « The Wandering Gli...

I want to show you how to exploit some of the extension methods in System.Query to make the code even cleaner. I used a method called Members that got all of the members in order of member type (i.e. fields first, properties next and so on). The code looked like this: public static IEnumerable<MemberInfo>Members(this Type t) { foreach (FieldInfo fi in t.GetFields()) yield return fi; foreach (PropertyInfo pi in t.GetProperties()) yield return pi; foreach (MethodInfo mi in t.GetMethods()) yield return mi; foreach (EventInfo ei in t.GetEvents()) yield return ei; } I needed to split the queries into each of the types we required in order to get elements ordered by type. David Ebbo&#039;s ASP.NET blog : Dynamic Data at MIX... Yesterday, I gave a talk on ASP.NET Dynamic Data at the MIX 2008 conference.

David Ebbo&#039;s ASP.NET blog : Dynamic Data at MIX...

It was a full room, and it was great to see the interest for the technology. What's nice about MIX is that they are making all talks available online within 24 hours. So you can watch my talk today! Here is the direct link. Note that the build of Dynamic Data that I use in the session is quite a bit newer than the one we made available in December. While a lot of the core concepts remain the same, there are a number of important changes, and I'll describe some of them here: ASP.NET Dynamic Data Preview. Solving LINQ&#039;s N-Tier Issues - Bryan Sampica. Ok, so maybe solving is somewhat of a misnomer, but we certainly can combat them with strength and conviction.

Solving LINQ&#039;s N-Tier Issues - Bryan Sampica

A little background on the subject first; LINQ has proven to be somewhat of a booger when attempting to work with it in a streamlined development environment when incorporating any sort of N-Tier pattern. Why you ask should it be a problem...the common answer I've heard many many times is, why should it be any different?

You have at the essence of it some pretty simple logical and physical layer guidelines right? It's well known in the industry at this point to create N-Layer app's to solve things like SOC (separation of concerns) and physical or network boundaries. But what about does it change anything we've done before? Not such a big deal right...statefull objects are a good thing! Imagine the very common scenario below: Now, before you go off the deep end, I realize that this problem is CAUSED by the Utilization of LINQ itself. Parallel LINQ: Running Queries On Multi-Core Pr...

Parallel LINQ Running Queries On Multi-Core Processors Joe Duffy and Ed Essey THis article is based on the Parallel FX library, which is currently in development.

Parallel LINQ: Running Queries On Multi-Core Pr...

10 Tips to Improve your LINQ to SQL Application... Hey there, back again.

10 Tips to Improve your LINQ to SQL Application...

In my first post about LINQ I tried to provide a brief(okay, bit detailed) introduction for those who want to get involved with LINQ to SQL. In that post I promised to write about a basic integration of WCF and LINQ to SQL working together, but this is not that post. Since LINQ to SQL is a code generator and an ORM and it offers a lot of things, it is normal to be suspicious about performance of it. These are right up to a certain point as LINQ comes with its own penalties. But there are several benchmarks showing that DLINQ brings us up to %93 of the ADO.NET SQL DataReader performance if optimizations are done correctly. Using the IRepository pattern with L... 27th March 2009. It's now a year since I wrote this post. Thanks to some comments by Janus2007 I've realised that it needs updating.

I've replaced the code with the current version of the Suteki Shop LINQ generic repository. There are a number of changes in the way it works. The most obvious, and one that I should have updated a long time ago is the GetAll method returns an IQueryable<T> rather than an array. Ben Hall&#039;s Blog: Obtaining table metadata using... One of the posts on the MSDN forum asked how to obtain the type length of a column in the table using Linq, this post will just explain how to obtain this information and some information on the MappingSource object. When linq does the mappings of database to objects, it transforms the DBType (NVarChar) into a CLR Type (String) which means when you are accessing the objects in code, you are accessing them as .Net types hence no simply way to get the underlying DBType. One way would be to look the information up in the mappings file or the attribute but Dinesh Kulkarni (PM) pointed out an more directly way, in an indirect way.

Microsoft: Group By Many/Multiple Cri... 101 Linq Samples. LINQ IQueryable Toolkit - Home. Fluent Linq to Sql - Home. Mitsu&#039;s blog : Linq GroupByMany dynamically. Mitsu&#039;s blog : Playing with Linq grouping: GroupByMany ? LINQ Extensions - Home. Lazy Computation in C# on MSDN. The Twitter Search API made easy with Linq to X... Linq. Extension Methods Roundup: Intersect, Union, AsNullable and GroupEvery Here we go with the third installment of the Extension Method Roundup. The reason behind these 'code dumps' is that LINQ is a central part of my coding and always find new problems I want to find elegant solutions to. Hope these prove as useful to you...