db.opt.Select(z => new { z.QuestionTitle, Count = z.Responces.Where(x => x.Responseval == Constants.options.Agree).Count(), Perc = (totresponcecount/Count)*100 }).ToList();
In the lambda above, when calculating the percentage, for example, I want to write (totresponcecount/Count)*100 , where Count already calculated in the previous expression.
So, how can I access the Count value for writing Perc = (totresponcecount/Count)*100 ?
source share