Microsoft AutoCollage 2008

I just thought I’d mention that Microsoft AutoCollage 2008 has been released. It is based on research from Microsoft Research in Cambridge and allows you to automatically create collages of images (not that you’d have guessed it from the name 😉 ). You can find out more, see example images, and download a free 30-day…

2

DataServiceQuery<T>.Expand

ADO.Net Data Services allows you to expose your LINQ To Entities model (or LINQ To SQL model, or even your custom IQueryable model) via a RESTful API with minimal coding. For example, if you’re working with the Northwind database you can use the URL http://server/Service.svc/Customers(‘ALFKI’)/Orders to retrieve the orders for customer ALFKI. This simplicity makes…

7

Improving ObjectQuery<T>.Include

** UPDATE: There’s a bug in the code below – see this post for the update! One of the great features of LINQ To SQL and LINQ To Entities is that the queries you write are checked by the compiler, which eliminates typing errors in your query. Unfortunately, the ObjectQuery<T>.Include function (which is used to…

14

A closer look at yield – part 3

This was only going to be two posts, but after my last post I’d been mulling over a post that looks at the compiler generated code in a more general way. Whilst catching up on blogs posts this morning I saw that Raymond Chen has written a blog post entitled ‘The implementation of iterators in…

0

A closer look at yield – part 2

In part 1, we took a quick tour of the yield keyword. In this post we’re going to have a look at the code that the compiler generates for us when we use yield. We’ll return to the first example from last time and insert a Console.WriteLine before the yield return statement: private static readonly…

1

Using let in LINQ to Objects – Part 3

  This is a follow-up to my two previous posts on the let keyword Using let in LINQ to Objects Using let in LINQ to Objects – Part 2 The real reason for this post is to link to a great post that K.Scott Allen has just published : Optimizing LINQ Queries. In his post,…

0

A closer look at yield

The yield keyword in C# is pretty powerful and expressive, but it doesn’t seem to be very widely known about. In this post we’ll take a quick look at what yield does and then I’ll post a follow-up that looks at what the compiler generates for you. Let’s start by looking at a simple (and…

3

Using let in LINQ to Objects – Part 2

In my previous post, I looked at what the compiler generates when you use the let keyword in LINQ to Objects. This is a follow-up post slanted towards performance. To this end, I set up four tests: static void TestBaseline() { var q = from c in Customer.AllCustomers select c; int count = q.Count(); }…

5

Using let in LINQ to Objects

I’ve been delving into LINQ to Objects recently (and enjoying it), but had missed the ‘let’ keyword. A colleague Rupert Benbrook(http://phazed.com) and I had been chatting about how to solve a particular issue using LINQ to Objects and he sent me a follow-up email with some code that used the ‘let’ keyword and I thought…

9

Breaking the ice

Hi, my name is Stuart Leeks (as you may have guessed from the blog title!) and I’m an Application Development Consultant at Microsoft in the UK. In keeping with the tradition of content-free first blog posts this is is a non-technical post. Future posts will be more technical in nature, and hopefully useful to someone…

0