converting linq query to icollection
Posted
by bergin
on Stack Overflow
See other posts from Stack Overflow
or by bergin
Published on 2010-05-30T15:35:17Z
Indexed on
2010/05/30
15:42 UTC
Read the original article
Hit count: 308
Hi there.
I need to take the results of a query:
var query = from m in db.SoilSamplingSubJobs where m.order_id == id select m;
and prepare as an ICollection so that I can have something like
ICollection<SoilSamplingSubJob> subjobs
at the moment I create a list, which isnt appropriate to my needs:
query.ToList();
what do I do - is it query.ToIcollection() ?
© Stack Overflow or respective owner