I am using WCF REST Preview 2 to test some REST services. The package has an extension to IEnumerable as ToDictionary(Func(TSource, TKey) keySelctor. Not sure how to define a lambda function to return keySelector?
Here is one example:
var items = from x in entity.Instances // a customized Entity class with list instances of MyClass
select new { x.Name, x};
Dictionary<string, MyClass> dic = items.ToDictionary<string, MyClass>(
(x, y) => ... // what should be here. I tried x.Name, x all not working
Not sure what should be the lambda Func should be to return a KeySelector?