My first class :
public class Person
{
public string name{get; set;}
public int Id{get; set;}
public list companies {get; set;}
}
I want to list of companies the person been.
Company Class:
public class Company
{
public string name{get; set;}
public string address{get; set; }
}
In Controller I am assigning the list:
List personList = new List();
I am returning this personlist to the view.
How can I create list of user defined type within a user defined class and How can I show A person multiple companies?
Jenith ThakkarPosted Jan 8, 2019, 4:26 AM
Kapil GaurPosted Jan 8, 2019, 9:20 AM
Munish KumarPosted Jan 8, 2019, 3:44 AM
Shoaib AhmedPosted Jan 8, 2019, 3:37 AM
Jenith ThakkarPosted Jan 8, 2019, 3:27 AM