I need to get the count of Employment for each Applicant in C# property, this is my code:
I am getting this error that not all the path return value what I need to change.
public class Application
{
public int NumberOfEmpl {
get
{
foreach (var item in Applicants)
{
return Applicants == null ? 0 : (item.Employments.Count);
}
}
set {}
}
}