Using Unity with LINQ

Dec 17, 2010 at 5:25 AM

Hi,

I have the following LINQ statement.

 

                                                      select new FetchedStockInfo
                                                      {
                                                          Title = stockInfo.Elements("column").ElementAt(11).Value,
                                                          Code = stockInfo.Elements("column").ElementAt(20).Value,
                                                     };

I want to use the following code with Unity

 

						    select new UnityContainer.Resolve<T>()
                                                      {
                                                          Title = stockInfo.Elements("column").ElementAt(11).Value,
                                                          Code = stockInfo.Elements("column").ElementAt(20).Value,
                                                     };

But this throws a syntax error.  Does anyone know how to fix this?
Thanks
Arjuna.

Dec 17, 2010 at 9:44 AM

Umm, I have no idea what that code's even supposed to mean. What are you expecting it to do?