May 2008 - Posts

LINQ to SQL Tips 6: How to refresh given DataContext won't stomp on your objects
The DataContext is a rather careful beast. Once an object is retrieved, the DataContext will not stomp on it if a query returns the same object again. This is intentional. Imagine the chaos if you modified some of the retrieved objects or even read the Read More...
LINQ to SQL Tips 5: Using stored procs that return multiple results
Often I get the following questions about stored procs in LINQ to SQL: I have sproc that returns multiple results. How can I use it in LINQ to SQL? Can I use a sproc that returns results of different shapes; e.g. Customers and Orders? I drag-dropped a Read More...
LINQ to SQL Tips 4: Use DeleteOnNull if you want to delete object with null FK
I often get a question along the following lines: If I remove one of the OderDetails from Order.OrderDetails collection, I see that the reference OrderDetail.Order is set to null but this just orphans the OrderDetail; it is not deleted. How can I change Read More...
LINQ to SQL Tips 3: Deferred (lazy) or eager loading of related objects with stored procs
This post is a confluence of two distinct sets of comments I got: The above-mentioned feature is a well-hidden secret; and I post code only in C# while there is a big community of VB users who like LINQ to SQL So here we go ... First, the MSDN docs on Read More...
From LINQ team to App Framework on Silverlight team
A while ago (October last year), I moved from C# team to the "UI Frameworks" team inside the .NET Developer Platform team. C# team is where LINQ was incubated and large portions of LINQ were productized: LINQ to Objects, LINQ to SQL and C# 3.0 to be precise. Read More...

Search

This Blog

Syndication

Page view tracker