I know we can use .ToDictionary(t => t.Key, t => t.Value) to convert linq resultset to Dictionary collection but I am looking for something more. I want to convert given linq result to `IEnumerable<Dictionary<string, object>>` and Here is what I am looking for:

Here is my linq query:

```
   var query = from v in dbContext.Persons
                            where !v.InActive
                            select new
                            {
                                v.PersonId,
                                v.Name,
                                v.DateOfBirth,
                            };
this.Persons = query.ToDictionaryCollection();

```

Here is what ToDictionaryCollection looks like:

```
public static IEnumerable<Dictionary<string, object>> ToDictionaryCollection<T>(this IEnumerable<T> collection) where T : class
        {
            if (collection == null || collection.Count() == 0)
            {
                return new List<Dictionary<string, object>>();
            }
            Type givenType = collection.First().GetType();
            PropertyInfo[] properties = givenType.GetProperties(BindingFlags.Instance | BindingFlags.Public);
            return collection
                      .Select(entity =>
                      {
                          return properties.Select(prop => new { Key = prop.Name, Value = prop.GetValue(entity) }).ToDictionary(prop => prop.Key, prop => prop.Value);
                      });
        }

```

With the current implementation, I believe there will be a penalty of using reflection on every entity. Is there any better way of doing this, using lambda expression tree or something similar?

NOTE: Above code is for Windows Phone 8 and Windows Store 8.1 applications.

Thanks,
Binoy