If I have a linq query that creates the anonymous type below:
select new
{
lf.id,
lf.name,
lf.desc,
plf.childId
};
Is it possible to assign a specific type to one of the members? Specifically I would like to make lf.id a null-able int rather than an int…
Not sure if this would work without trying, but could you do this:
To force the cast?
Edit: looks like no, but I was able to do this:
And that worked fine.