I have the following code:
var tableID = from data in studyData.Tables["MX_MD_TABLE"].AsEnumerable() where data.Field<string>("table_name").ToLower() == "mbddx_study_set" select data.Field<long>("ID").ToString(); string tableID = tableID.ElementAt(0).ToString(); It works as expected and the tableID is what I want. Is there a way for the LINQ query to actually return and store the returned string in as it's value, rather than having to create another object to hold it? I know that this query and a few others I will be doing, will only return the single string.
Thanks.