Last active
September 8, 2015 09:50
-
-
Save pparadis/aa6f2c8e2b2b35ad5f2b to your computer and use it in GitHub Desktop.
User
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class User | |
{ | |
public Guid Id { get; set; } | |
public string Name { get; set; } | |
public List<Department> Departments { get; set; } | |
} | |
public class Department | |
{ | |
public Guid Id { get; set; } | |
public string Name { get; set; } | |
} | |
var users = new List<User>(); | |
users.Add(new User | |
{ | |
Departments = new List<Department> | |
{ | |
new Department | |
{ | |
Name = "Dept 1" | |
}, | |
new Department | |
{ | |
Name = "Dept 2" | |
}, | |
}, | |
Name = "French Coding", | |
}); | |
users.Add(new User | |
{ | |
Departments = new List<Department> | |
{ | |
new Department | |
{ | |
Name = "Dept 2" | |
}, | |
new Department | |
{ | |
Name = "Dept 3" | |
}, | |
new Department | |
{ | |
Name = "Dept 4" | |
}, | |
}, | |
Name = "Homme Poux", | |
}); | |
users.Add(new User | |
{ | |
Departments = new List<Department> | |
{ | |
new Department | |
{ | |
Name = "Dept 1" | |
}, | |
new Department | |
{ | |
Name = "Dept 4" | |
}, | |
}, | |
Name = "Pascal Paradis", | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment