Viewing entries tagged
LINQ to SQL

Comment

Presentation - Canberra User Group - LINQ to SQL and WCF

Yesterday I presented in an unusually cold Canberra. The topic was using LINQ to SQL with WCF in a three tiered architecture.

There was a lunchtime session at King O’Malley’s Irish Pub followed by an evening session at Microsoft Canberra.

A big thank you to Adam Cogan and Justin King for accompanying me to Canberra and proving useful feedback. Also a big thank you to those who attended the seesions for the interesting view point and discussions we had on the topic.

Resources

Comment

Comment

Weekly Training - LINQ & Silverlight

This weeks session was on LINQ and Silverlight.

LINQ

The LINQ session was a pretty basic roundup of some of the most common extension methods that you use with LINQ. Try filling out the blanks in the following code snippet

Comment

Comment

LINQ to SQL with WCF - Lazy Loading and Caveats

Just a quick tip for those of you working with LINQ and WCF.

LINQ-to-SQL natively supports lazy loading as long as your entities are still managed by the DataContext. However, when you pass your entities across WCF your entities become detached from the DataContext so you can’t lazy load on the client side - which makes perfect sense.

The question is how do you then pass a LINQ entity and its child collections across WCF?

This is where the DataLoadOptions class comes in handy. This class allows you to specify exactly what child collections to load along with your entity.

Without this you would have to make two service calls - one to get the parent object and another to get the child collection.

Comment