C# LINQ Question -
i have following code
var query = lookup in dataset.tables["mbddx_lookup"].asenumerable() lookup.field<string>("lookup_value") == "oncology" select new { lookupid = lookup.field<long>("id") };
this returns want. however, want check field within clause , 'select new' also.
how can this?
thanks.
edit: second piece of data wish extract within mbddx_lookup field.
if trying check same field 2 possible values, use or operator ||
:
var query = lookup in dataset.tables["mbddx_lookup"].asenumerable() lookup.field<string>("lookup_value") == "oncology" || lookup.field<string>("lookup_value") == "zoology" select new { lookupid = lookup.field<long>("id"), lookup = lookup.field<string>("lookup_value") };
Comments
Post a Comment