I have not used LINQ before and have need to do dynamic queries on a dynamically built datatable. I am investigating different options and want to know if LINQ can mimic this SQL query example when run on an untyped datatable. The datatable’s structure is dynamic according to what source and fields a user selects.
Can LINQ do this:
select CAST(EventID as varchar(8)) + '_' + CAST(UserID as varchar(8)) as UserEventRef
from tblEvent
I have to allow the user to build their own query and allow them to do calculations and casts as they wish.
EDIT: The result must NOT be strongly typed.
Sure.