Browse by Tags

Specification Pattern Continued
Thu, Sep 29 2011 6:35 AM
In a previous post , I talked about the specification pattern. In the last sentence I promised you to keep you posted on the next version of the implementation. I still owe you guys that result. So without further ado: Download it here . The implementation itself is pretty straightforward. The class has a protected property Predicate that takes in a Lambda expression... Read More...
Specification Pattern Implementation
Tue, Nov 30 2010 6:05 AM
For some time now I’ve been willing to find a good implementation of the Specification Pattern. Information about this pattern can be found here: http://en.wikipedia.org/wiki/Specification_pattern interface ISpecification<TEntity> { bool IsSatisfiedBy(TEntity item); } The idea I had was to use the IQueryable of Linq to query over large collections... Read More...
Linq2Sql: LEFT OUTER JOIN with multiple columns
Fri, Dec 4 2009 10:13 AM
I learned from the website HookedOnLinq.com the way to do a LEFT OUTER JOIN with multiple columns. var query = from c in Customers join o in Orders on new {Col1 = c.CustomerID, Col2 = c.CountryCode} equals new {Col1 = o.CustomerID, Col2 = o.CountryCode} into g from o in g.DefaultIfEmpty() select new {c.CustomerID, c.CountryCode, OrderId = (o == null ? null :... Read More...
Missing Connectionstring for DBML
Mon, Sep 22 2008 11:16 AM
I encountered a problem today which in the end had an easy solution, but nevertheless took me over an hour to fix. Our project had been running for weeks without any problems, but today it suddenly failed with the message: 'ProjectDataContext' does not contain a constructor that takes '0' arguments. The Connection setting was empty and I couldn't... Read More...