Я хотел бы получить пол для расчетов, например, мужские и женские варианты находятся в одной колонке. Я хотел бы получить всех мужчин или всех женщин для расчета.
У меня есть "вычисленное свойство", которое дает мне список всех элементов вместе с вычислением. Вот код:
partial void MeanFemale_Compute(ref string result)
{
// Set result to the desired field value
int totalAge = 0;
int count = 0;
foreach (InsuranceQuotation i in his.DataWorkspace.ApplicationData.InsuranceQuotations)
{
totalAge += i.mAge;
count++;
}
if (count != 0)
{
result = (totalAge / count).ToString();
}
}
Как мне получить фильтр в этом "вычисленном свойстве".