using System.Collections.Generic;
public static void Main()
var docs = new List<Doc>()
new Doc(1, "C:\\Files\\A.txt"),
new Doc(2, "C:\\Files\\B.txt"),
new Doc(3, "C:\\Files\\C.txt"),
var users = new List<User>()
var dus = new List<Doc_User>()
var db = new DB() { Docs = docs, Users = users, DU = dus };
var model = (from d in db.Docs
join du in db.DU on d.Id equals du.DocId
join u in db.Users on du.UserId equals u.Id
select new DataModel() { DocPath = d.Path, UserName = u.Name }).ToList();
foreach(var item in model)
Console.WriteLine(item.DocPath + " | " + item.UserName);
public List<Doc> Docs {get; set;}
public List<User> Users {get; set;}
public List<Doc_User> DU {get; set;}
public Doc(int id, string path)
public int Id {get; set;}
public string Path {get; set;}
public User(int id, string name)
public int Id {get; set;}
public string Name {get; set;}
public Doc_User(int idD, int idU)
public int DocId {get; set;}
public int UserId {get;set;}
public string DocPath {get; set;}
public string UserName {get; set;}