linq - How to save subquery result? -


i have such query:

var result = tsr in db.tsr tsr.someid = x tsr.sequence > ((from tsr2 in db.tsr tsr2.someid = y tsr2.fitid = tsr.fitid select tsr2.sequence)).firstordefault() select new myclass() {    properties = tsr.properties // (simplicified) } 

i wonder how select tsr2.sequence value newclass object?

select new myclass(){  myclass.property1 = tsr.sequence.propertyx, myclass.property2 = tsr.sequence.propertyy, myclass.property3 = tsr.sequence.propertyz, ...... } 

you can select , assign properties 1 one. , sure myclass object properties public


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -