I have two conditions to the following linq, IsThere
and Conditional
are provided by the user.
They can be true, false, or "not given".
var result = (from DataRow dt in resultForfaultStat.Rows
select new fault_StatisticsViewModel{
Name = dt["name"].ToString(),
SureName = float.Parse(dt["fname"].ToString()),
IsThere = Boolean.Parse(dt["is_there"].ToString()),
Conditional = Boolean.Parse(dt["good_or_bad"].ToString())
})
.Where(s => s.IsThere == true && s.Conditional == true)
.ToList();
How should I manage to pass these all dynamically?