I have these models:
public class Condominium
{
public int CondominiumID { get; set; }
public int BatchID { get; set; }
public string Name { get; set; }
public bool LiveInCondominium { get; set; }
public string Phone { get; set; }
public string Email { get; set; }
public Batch Batch { get; set; }
public List<Employee> Employees { get; set; }
}
public class Employee
{
public int EmployeeID { get; set; }
public int CityID { get; set; }
public string UserID { get; set; }
public Condominium CondominiumID { get; set; }
public string Name { get; set; }
public string Address { get; set; }
public string ZipCode { get; set; }
public string Contact { get; set; }
public string Phone { get; set; }
public string Email { get; set; }
public City City { get; set; }
public Condominium Condominium { get; set; }
}
I need to create Employee
objects dynamically and put them into a list and when I make a post request the object Condominium
contains a list with Employee
objects. I don't have any idea how I can make the view for this.