I have the below LINQ query. FactColumns is a list of FactColumn objects and SelectedColumns is a list of strings. I want to get a list of FactColumn objects using an inner join on SelectedColumns. However, I am getting null for below query.
var lst = from fc in this.DataSetFact.FactColumns
join column in m_TableDataDict[tableGuid].SelectedColumns
on fc.Name equals column
select new
{
fc.ColumnType,
fc.DataType,
fc.FriendlyName,
fc.Name,
fc.ParentFactName,
fc.Size,
fc.State
};
Why am I getting null?
I can see above code running fine. Check if data is loaded properly.
Sample
What about this using lambda: