Exemplo n.º 1
0
 public GroupIndexViewModel(Group group)
 {
     this.GroupId = group.GroupId;
     this.Name = group.Name;
     this.Teachers = group.Users.Where(x=>Roles.IsUserInRole(x.UserName, "Teacher")).ToList();
     this.Students = group.Users.Where(x => Roles.IsUserInRole(x.UserName,"Student") && x.FutureStudent==false).ToList();
 }
Exemplo n.º 2
0
 public GroupDetailsViewModel(Group group)
 {
     this.GroupId = group.GroupId;
     this.Name = group.Name;
     this.Teachers = group.Users.Where(x=>Roles.IsUserInRole(x.UserName, "Teacher")).Select(x => x.FullName).ToList();
     this.Students = group.Users.Where(x => Roles.IsUserInRole(x.UserName,"Student") && x.FutureStudent==false).Select(x => x.FullName).ToList();
     this.CreatedDate = group.CreatedDate;
 }