Paulo Morgado

.NET Development & Architecture

This Blog

Syndication

Search

Tags

News

Unit Test Today! Get Typemock Isolator!

Projects

Books

 

Visitors

Visitor Locations

Community

Email Notifications

Archives

Profile

Disclaimer

The opinions and viewpoints expressed in this site are mine and do not necessarily reflect those of Microsoft, my employer or any community that I belong to. Any code or opinions are offered as is. Products or services mentioned are purchased by me, made available to me by my employer or the manufacturer/vendor which doesn't influence my opinion in any way.

Browse by Tags

All Tags » LINQ » SoftDev » .NET (RSS)
LINQ: Enhancing Distinct With The SelectorEqualityComparer
On my last post , I introduced the PredicateEqualityComparer and a Distinct extension method that receives a predicate to internally create a PredicateEqualityComparer to filter elements. Using the predicate, greatly improves readability, conciseness...

Posted Fri, Apr 9 2010 2:32 by Paulo Morgado | 7 comment(s)

Filed under: , , , , ,

LINQ: Enhancing Distinct With The PredicateEqualityComparer
Today I was writing a LINQ query and I needed to select distinct values based on a comparison criteria. Fortunately, LINQ’ s Distinct method allows an equality comparer to be supplied, but, unfortunately, sometimes, this means having to write custom equality...

Posted Thu, Apr 8 2010 2:18 by Paulo Morgado | 11 comment(s)

Filed under: , , , , ,

LINQ To SQL Tips & Tricks: String Operations
LINQ brought developers a very user friendly and domain independent style of writing queries. The fact that the way queries are written is domain independent doesn’t mean that any query will compile the same way or even run the same way. You’ll always...

Posted Tue, Oct 13 2009 1:51 by Paulo Morgado | with no comments

Playing With SQL Server CLR Integration – Part III
You might have noticed that I used LINQ in my last Playing With SQL Server CLR Integration posts ( Part I , Part II ). I couldn’t make it work with the standard Visual Studio 2008 SQL CLR project template. Changing the Target Framework to .NET Framework...

Posted Fri, Jun 12 2009 1:11 by Paulo Morgado | with no comments

LINQ With C# Book Is Finally Out
It’s finally out! The LINQ Com C# (LINQ With C#) book that Luís and I wrote is out. Well, mostly Luís than I. This book, published by FCA , is targeted at anyone that already knows C# 2.0 and wants to know learn the new features introduced with C# 3.0...

Posted Mon, May 18 2009 0:39 by Paulo Morgado | with no comments

Filed under: , , , , ,

LINQ With C# Book
Luís just broke the news on our LINQ with C# book. I was honored with the invitation from Luís to write this book with him for FCA , for which he has already published a few books [ ^ ] [ ^ ] [ ^ ] before. This will be an entry level book in Portuguese...

Posted Mon, Sep 22 2008 0:42 by Paulo Morgado | 1 comment(s)

Filed under: , , , , ,

More On Another Way For Using The “using” Keyword
In the past I presented another possible use for the using keyword: as hints on LINQ . I’ve been giving some thought about this lately and refined my proposal. var q = from person in personCollection using MyEnumerableExtensions group person by person...

Posted Mon, Aug 11 2008 1:47 by Paulo Morgado | 2 comment(s)

Filed under: , , , , ,

C# And Visual Basic Generate Different Expression Trees
(This was pointed out to me by Frans Bouma and explained by Jon Skeet ) Imagine you have this set of classes: public class A { public virtual string P { get { return "A" ; } } } public class B : A { } public class C : B { public override string...

Posted Mon, Aug 4 2008 1:23 by Paulo Morgado | 1 comment(s)

Build Your Own LINQ Provider
Mehfuz has been building a toolkit for creating LINQ providers and it's available at CodePlex : LINQExtender He has even built a LINQ provider for flickr with it: LINQ.Flickr

Posted Wed, May 7 2008 23:16 by Paulo Morgado | with no comments

TypeMock: How to Make Reflective Mocks More Natural
Like I said before , this as been on the back of my mind for a while. A while back I introduced a way to get the MethodInfo of a method in a strongly typed way using LINQ , and that's how I'm going to make Reflective Mocks more Natural . Well...

Posted Thu, Jan 31 2008 23:56 by Paulo Morgado | 2 comment(s)

Free e-books on the Visual Studio 2008 Learning Portal
Microsoft is offering free e-books (or, at least some chapters) in the Visual Studio 2008 Learning Portal .

Posted Thu, Jan 3 2008 0:23 by Paulo Morgado | 6 comment(s)

Visual Studio 2008 and .NET Framework 3.5 shipped!
Visual Studio 2008 and .NET Framework 3.5 has finally shipped. MSDN subscribers can download the final version of Visual Studio 2008 from MSDN Subscription Downloads , but anyone can get a trial version or an Express Edition . The .NET Framework 3.5 contains...

Posted Wed, Nov 21 2007 0:21 by Paulo Morgado | with no comments

Getting MethodInfo using LINQ
At the last MVP Global Summit , Mads showed me and Rich a way to get the MethodInfo of a method in a strongly typed way using LINQ . Here is how you can do it: public static class TypeHelper { public delegate void Method (); public delegate void Method...

Posted Fri, Mar 23 2007 13:06 by Paulo Morgado | with no comments