-6
我有4个名单,我需要联合起来LINQ的加入4名单<T>
public class Person
{
public int personid { get; set; }
public string fname { get; set; }
public string lname { get; set; }
}
public class Department
{
public int depid { get; set; }
public 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<Person> Persons=GetPersons();
List<Department> departmentlist=getDepartments();
List<Group> grouplist=getgroups();
List<UploadFile> filelist=getFiles();
我需要一个像输出:
fileid fname filename path 1 samplename Mydoc departmentname+">"+groupname
如果这些get函数来自同一个数据库,我建议使用Linq2SQL或实体框架进行连接,而不是使用in内存。 – Magnus 2012-04-12 08:55:18
我们没有为你做功课。向我们展示您的代码,解释您遇到的问题,然后我们可以为您提供帮助。 – 2012-04-12 08:55:23