abdolwahab alemi

abdolwahab alemi

  • NA
  • 98
  • 63.9k

Join using linq

Apr 12 2012 4:21 AM
hi

 i have 4 list that  I need to join together

  public class Person
  {
  public int personid { get; set; }

  public string fname { get; set; }

  public string lname { get; set; }
  }

  public class Department
  {
  int depid { get; set; }

  string departmentname { get; set; }
  }

  public class Group
  {
  public int groupid { get; set; }

    public  int depid { get; set; }

    public  string groupname { get; set; }
  }

  public class UploadFile
  {
  public  int fileid { get; set; }

    public  int personid { get; set; }

  public int groupid{ get; set; }

  public string filename { get; set; }
  }

 List<UploadFile> filelist=getFiles();

 List<Person> personlist=getPersons();

 List<Department> departmentlist=getDepartments();

 List<Group> grouplist=getgroups();

 I need an output like:

 fileid  fname  lname  filename       path 

 1  Jon    ...  ...  departmentname+">"+groupname

thanks!

Answers (3)