I have a Employee and EmployeeAddress class.
Public Class Employee{
Public Employee{
address = new List<EmployeeAdress>();
}
List<EmployeeAdress> address { get; set; }
}
Public Class EmployeeAddress{
public string address;
public string zip;
public string state;
}
<div></div> <div>I have Employee class populated with data having EmployeeAddress as a list.</div> <div></div> <div>I am trying to find out the list of employee in specific zipCode.</div> <div></div> <div>
foreach (string zipCode in ZipCodes)
{
foreach (Emplopyee emp in listEmployee)
{
List<Employee> empList = Emplopyee.EmplopyeeAddress.Where(x => x.zip == zipCode));
}
}
I am gettting an error converting EmployeeAddress to Employee. Tried couple of different ways but not able to resolve the error. Any help would be appreciated.
</div>