How to get the parents table third column of data in child table data in asp.net mvc3
Hi to all,
I developed my asp.net mvc3 app in code first basis
I am getting Lastname in dropdown list
is there any possible way to get the Name along with Lastname
public class people /getting data from User class
{
[Key]
public int groupid { get; set; }
[Required]
public string name { get; set; }
[Required]
public int UserId { get; set; }
[ScriptIgnore]
public virtual Users user { get; set; }
}
public class Users/parent table
{
[Key]
public int UserId { get; set; }
[Required]
[StringLength(100)]
public string LastName { get; set; }
[Required]
[StringLength(100)]
public string Name { get; set; }
[ScriptIgnore]
public virtual ICollection<people> people { get; set; }
}