Using Lazy<T> with KeyedCollection

For a project which I’m currently working on I’ve got a few custom collections which I need to return from various methods on a data repository. There’s a bit of heavy lifting that is done in each of the repository methods so I wanted…


This content originally appeared on Posts on LINQ to Fail and was authored by Posts on LINQ to Fail

For a project which I’m currently working on I’ve got a few custom collections which I need to return from various methods on a data repository. There’s a bit of heavy lifting that is done in each of the repository methods so I wanted to have a way which each of them could be lazy loading the items into the collection. This would also mean that if you’re only wanting a subset of the collection you don’t create all the objects.


This content originally appeared on Posts on LINQ to Fail and was authored by Posts on LINQ to Fail


Print Share Comment Cite Upload Translate
APA
Posts on LINQ to Fail | Sciencx (2023-12-01T02:59:59+00:00) » Using Lazy<T> with KeyedCollection. Retrieved from https://www.scien.cx/2010/09/22/using-lazyt-with-keyedcollection/.
MLA
" » Using Lazy<T> with KeyedCollection." Posts on LINQ to Fail | Sciencx - Wednesday September 22, 2010, https://www.scien.cx/2010/09/22/using-lazyt-with-keyedcollection/
HARVARD
Posts on LINQ to Fail | Sciencx Wednesday September 22, 2010 » Using Lazy<T> with KeyedCollection., viewed 2023-12-01T02:59:59+00:00,<https://www.scien.cx/2010/09/22/using-lazyt-with-keyedcollection/>
VANCOUVER
Posts on LINQ to Fail | Sciencx - » Using Lazy<T> with KeyedCollection. [Internet]. [Accessed 2023-12-01T02:59:59+00:00]. Available from: https://www.scien.cx/2010/09/22/using-lazyt-with-keyedcollection/
CHICAGO
" » Using Lazy<T> with KeyedCollection." Posts on LINQ to Fail | Sciencx - Accessed 2023-12-01T02:59:59+00:00. https://www.scien.cx/2010/09/22/using-lazyt-with-keyedcollection/
IEEE
" » Using Lazy<T> with KeyedCollection." Posts on LINQ to Fail | Sciencx [Online]. Available: https://www.scien.cx/2010/09/22/using-lazyt-with-keyedcollection/. [Accessed: 2023-12-01T02:59:59+00:00]
rf:citation
» Using Lazy<T> with KeyedCollection | Posts on LINQ to Fail | Sciencx | https://www.scien.cx/2010/09/22/using-lazyt-with-keyedcollection/ | 2023-12-01T02:59:59+00:00
https://github.com/addpipe/simple-recorderjs-demo