I'm a music and software developer who's probably off looking for a cup of coffee right now.
Wouldn’t it be loverly if we could just ask a steaming pile of SalesOrderHeaders for these things, one at a time, in plain English? Picture it.Seriously, see it first—great APIs start by envisioning the consuming code up front:
var myOrders = db.SalesOrderHeadersWhat’s killer about what we’re about to pull off here is that we can make this happen without ever sullying our data access code. We can keep the logic in a totally separate layer. This is made possible by the modern .NET miracle of Extension Methods, a feature introduced in .NET 3.0, largely to make LINQ possible at all. And in the same way NASA indirectly gave us a really pretty nice pen because Neil and Buzz and pals needed to scratch chickens whilst being floaty and disoriented, the benefits of the necessity extend beyond the mother of their invention. See what I did there? Extend. Moving on.
.From(DateTime.Today.AddDays(-7))
.To(DateTime.Today)
.FromOnline()
.ThatAreHighlyTaxed()
.ThatWereMadeOnA(DayOfWeek.Thursday)
.OrderedByARelative();
Get Your “Legos” Right With Fluent Query Extensions [ Aptera Software ]
My First™ Open Source project:
A little Persistence Ignorance framework that features those Unit of Work, Repository, and Inversion of Control patterns you keep hearing so much about.
Only, now you’re not pecking them out and maintaining them in your application code, because Ignorance already did that.
So, in much the same way that your business logic will be carefree and clueless about how your data is persisted, you get to skip down the hallway and be all, “la la, business code, business code”, and not give two squirts about implementing another IRepository.
Epifode The Fecond, in which IT’S US AGAIN. Also, we learn about dealing with those words that we don’t wish for the tenderest of our loved ones to hear, while our master of ceremony manages to gain some clarity on This Dance We Do.
You guys all have guns, right?
![]()