Browse by Tags

Tagged Content List
  • Blog Post: Web API [Queryable] current support and tentative roadmap

    The recent preview release of OData support in Web API is very exciting (see the new nuget package and codeplex project ). For the most part it is compatible with the previous [Queryable] support because it supports the same OData query options. That said there has been a little confusion about how ...
  • Blog Post: Creating a Data Service Provider – Part 9 – Un-typed

    Background info: This post builds on Parts 1 thru 8 which teach you how to create a typed Data Service Provider. But now the part we’ve all been waiting for- an un-typed DSP – which is what I expect most real world DSP implementations will be based on. What do we mean by Un-typed? An un-typed DSP is...
  • Blog Post: Tip 40 – How to materialize presentation models via L2E

    Problem: Imagine that you have these entities public class Product { public int ID { get; set; } public string Name { get; set; } public virtual Category Category { get; set; } } public class Category { public int ID { get; set; } public string Name { get; set; } public virtual List<Product> Products...
  • Blog Post: Tip 35 – How to write OfTypeOnly<TEntity>()

    If you write a LINQ to Entities query like this: var results = from c in ctx.Vehicles.OfType<Car>() select c; It will bring back, Cars and any type that derives from Car, like say SportCar or SUV. If you just want Cars and you don’t want derived types like SportCars or SUVs in LINQ to...
  • Blog Post: Some comments on efficient SOA method composition

    A couple of posts back I started talking about composing SOAPY operations efficiently, by shipping intent to the service. An interesting debate ensued in my comments: Kristofer (the guy behind the Huagati tools for DBML and EDMX , and it seems a man after my own heart) got all excited and suggested the...
  • Blog Post: Tip 8 - How to write 'WHERE IN' style queries using LINQ to Entities

    Imagine if you have a table of People and you want to retrieve only those whose the Firstname is in a list of interesting firstnames. This is trivial in SQL, you write something like this: SELECT * FROM People WHERE Firstname IN ('Alex', 'Colin', 'Danny', 'Diego') A SQL IN is equivalent to a LINQ...
  • Blog Post: LINQ to Objects and Buffer<T>

    I was debugging a problem a couple of days ago, when I learned something interesting. I had some code that looked like this: foreach(Employee e in manager.Manages) { … } The manager.Manages property returned a custom implementation of ICollection<Employee> that lazy-loads it’s data from somewhere...
  • Blog Post: LINQ… the board game

    About a week ago I was wandering through Crossroads mall in Bellevue, and with my wife’s new camera in hand, I spotted this: Now I’m sure at least one of you have actually played this, but I’d never even heard of it. If you know me, you know I’m vertically challenged, so… I just couldn’t reach the box...
Page 1 of 1 (8 items)