I have a custom databound web control that was built a while back. Its a custom control that binds directly to an EntityCollection and displays some fields (X,Y,Z) for each row in the collection . We are having some performance issues becuase the table has like 50 columns now and with EntityCollection we bring back all columns. This control which i did not create, stores the datasource in viewstate (yeah, i know bad... but i don't have time to go and refactor all this right now). So I converted this to use a typedlist (which btw, creating typed lists from code rocks....) but now i broke the contract between my custom control and the datasource since the only common interface between datatable and entity collection that i can see is IListSource which does not seem to help me much. What is the easist way to convert a TypedList to an EntityCollection or an IEnumberable? basically i want to be able to set my TypedList to the DataSource property of my control so i can still do native binding. One way i can think of is manually convert the typed list to a custom IEnumberable or something, will this work, i assume i will still need to use the necessary field names. EntityCollection is basically a collection implimenting IEnumerable right? Or is there a native llblgen way to do this? hopefully this is understandable. I am using Self Servicing if that matters.
Thanks.
can someone also tell me why datatable does not impliment IEnumerable, there must be a reason and i dont know what it is due to my lack of knowlege.