Hello:
I have this syntax, which works:
I am trying to discern if this is LINQ, or another format. Reason bring, I tried running some LINQ queries against my dataset and was unsuccessful in converting a dataset to a datatable. The datatable has the red underline of death.
This link seems to be about LINQ: https://the-eye.eu/public/Books/IT Various/LINQ Quickly.pdf
But what is my code representative of, and can I adopt the use of LINQ instead? Note, all datasets currently exist, and while I can make new ones and set them as equal to the old ones, I would rather not have to customize the existing data structure with code.
Thanks.
I have this syntax, which works:
C#:
DataTable dt = resourcePlanningDataSet.Tables[
[FONT=Consolas][SIZE=2][COLOR=#a31515][FONT=Consolas][SIZE=2][COLOR=#a31515][FONT=Consolas][SIZE=2][COLOR=#a31515]"Jobs"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]];[/SIZE][/FONT][/SIZE][/FONT]
[FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]
[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]var[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2] qry1 = dt.AsEnumerable().Select(a => a.Field<[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]string[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]>([/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#a31515][FONT=Consolas][SIZE=2][COLOR=#a31515][FONT=Consolas][SIZE=2][COLOR=#a31515]"Customer"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]).ToString()).Distinct().ToList();[/SIZE][/FONT][/SIZE][/FONT]
[FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]
cboCustomer.DataSource = qry1;
[/SIZE][/FONT][/SIZE][/FONT]
I am trying to discern if this is LINQ, or another format. Reason bring, I tried running some LINQ queries against my dataset and was unsuccessful in converting a dataset to a datatable. The datatable has the red underline of death.
This link seems to be about LINQ: https://the-eye.eu/public/Books/IT Various/LINQ Quickly.pdf
But what is my code representative of, and can I adopt the use of LINQ instead? Note, all datasets currently exist, and while I can make new ones and set them as equal to the old ones, I would rather not have to customize the existing data structure with code.
Thanks.