Filter ReadOnlyList
Old forum URL: forums.lhotka.net/forums/t/9310.aspx
t.kehl posted on Sunday, August 01, 2010
Hi.
I have a ReadOnlyList called CommunicationTypeList.
Now, when I do
this.CommunicationTypeList.Where(x => x.SystemType == (short)CommunicationSystemType.Mail)
How can I get the result of this as a filtered CommunicationTypeList?
Thanks for your help.
Best Regards, Thomas
RockfordLhotka replied on Sunday, August 01, 2010
there is no easy way, this is not how linq works. linq returns an ienumerable of t, that's it.
you can use the csla .ToSynclist extension method to essentially wrap the linq result in a more powerful collection type. if you are unable to get good data binding to the linq result the synclist might work better.Copyright (c) Marimer LLC