>>
>> var query = from c in dtInstructors.AsEnumerable()
>> where (from b in dtAllScheduled.AsEnumerable() where 1 == b.Field<Byte>("layer")
>> && b.Field< )
>>
>>based on
http://www.telerik.com/forums/exists-query-in-dynamic-linq>
>Add "select c" at the end to select your datarow from dtInstructors. Use CopyToDataTable (
http://msdn.microsoft.com/en-us/library/system.data.datatableextensions.copytodatatable%28v=vs.110%29.aspx) to put the results back into a datatable if there are any results.
For now I am struggling to write the query. I decided to try Any operator, but I can not figure out how to add second table.
Here is what I have now and confused as what I wrote makes no sense and I don't know how to fix:
var query = from c in dtInstructors.AsEnumerable().Any
(from b in dtAllScheduled.AsEnumerable() where 1 == b.Field<Byte>("layer")
&& true==b.Field<Boolean>("schassign") && c.Field<String>("instr_id")== b.Field<String>("resource_id")
);
If it's not broken, fix it until it is.
My Blog