-
Recent Posts
Recent Comments
- John Teague on Polymorphism Part 2: Refactoring to Polymorphic Behavior
- Artëm Smirnov on Polymorphism Part 2: Refactoring to Polymorphic Behavior
- The Morning Brew - Chris Alcock » The Morning Brew #1344 on Pablo’s Fiesta is Back!!
- MBR on Polymorphism Part 2: Refactoring to Polymorphic Behavior
- Mario Pareja on Polymorphism: Part 1
Archives
- April 2013
- March 2013
- February 2013
- December 2012
- November 2012
- May 2012
- April 2012
- February 2012
- September 2011
- August 2011
- June 2011
- April 2011
- March 2011
- November 2010
- June 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- February 2009
- January 2009
- November 2008
- October 2008
- September 2008
- August 2008
- June 2008
- May 2008
Categories
- ActiveRecord
- adnug
- april-fools
- automated-builds, ADNUG
- c#
- Castle
- codecamp
- Command Processor Pattern
- CSS
- DDD
- design patterns
- fiesta open-spaces
- IOC
- iron ruby
- JavaScript
- jQuery
- Law of Demeter
- linq
- los-techies-fiesta
- MonoTouch
- MVC
- NHibernate
- NHibernate DDD
- nodejs
- PTOM
- Repository Pattern
- resharper
- Software Design
- SOLID
- TDD
- Testing
- Uncategorized
Meta
Category Archives: linq
Thinking Linq
I’ve been comfortable using LINQ for what seems like a long time. I’m noticing that I’ve been implementing some of the lesser used functions a bit more as of late, but I’m not sure exactly when they’re appropriate. Take the … Continue reading
Queue is Always Empty Using yield return
I ran into an issue in a C# application the other day. Thankfully I figured out what was going wrong right away, but it could have turned into a big headache potentially. Post Footer automatically generated by Add Post Footer … Continue reading
Autoprojecting LINQ queries
Something I’ve been looking at adding to AutoMapper was the idea of doing automatic query projection in the Select query projection in LINQ statements. One downside of AutoMapper is that projection from domain objects still forces the entire domain object … Continue reading
What is Projection?
I think there’s great benefit in not only knowing how to design your code to use common patterns but also to be able to speak about them clearly and concisely to others. If I mention that the problem sounds like … Continue reading
Also posted in DDD, NHibernate
11 Comments
Implementing Domain Queries
My current Repository interface looks something like this: public interface IRepository { T FindOne<T>(int id); T FindBy<T>(Expression<Func<T, bool>> expression); IEnumerable<T> FindAllBy<T>(Expression<Func<T, bool>> expression); IEnumerable<T> FindAll<T>(); T FindOneBy<T>(Expression<Func<T, bool>> expression); void Save<T>(T target); void Update<T>(T target); void SaveOrUpdate<T>(T target); void Delete<T>(T … Continue reading
Also posted in DDD, NHibernate
11 Comments
Selecting Static Results with Dynamic LINQ
Dynamic LINQ (DLINQ) is a LINQ extension provided in the VS 2008 Samples. Scott Guthrie provides a good overview here: Dynamic LINQ (Part 1: Using the LINQ Dynamic Query Library), but the executive summary is that it implements certain query … Continue reading
Also posted in adnug, codecamp
2 Comments
LINQ query operators and null lists
One of my pet peeves with the LINQ extension methods is their inability to handle null source lists. For example, this will throw an ArgumentNullException: [Test] public void Should_handle_nulls() { List<int> ints = null; ints.Any(num => num < 0).ShouldBeFalse(); } … Continue reading
More missing LINQ operators
Continuing an old post on missing LINQ operators, the wonders of extension methods allow us as developers to fill potential holes in LINQ operators. Whether it’s a Zip method (now included in .NET 4.0), or better methods for IComparer-based operators, … Continue reading
Hacking LINQ Expressions: Join With Comparer
In this installment of my Hacking LINQ series we’ll take a look at providing an IEqualityComparer for use in a LINQ join clause. The Problem Many of the Standard Query Operators require comparing sequence elements and the default query providers … Continue reading
Also posted in JavaScript
1 Comment
Hacking LINQ Expressions: Select With Index
First, a point of clarification: I use LINQ Expressions to mean (Language-INtegrated) Query Expressions (the language feature) rather than Expression Trees (the .NET 3.5 library in System.Linq.Expressions). So what do I mean by “Hacking LINQ Expressions”? Quite simply, I’m not … Continue reading
Also posted in JavaScript, jQuery
3 Comments
