public static List <QuizTakersVM> SetUser(List <QuizTakersVM> list)
 {
     foreach (var model in list)
     {
         model.User = UsersVM.MToVM(UsersService.GetByID(Guid.Parse(model.UserID)));
     }
     return(list);
 }
        //setting sub data sub classes of this class properties are set here
        public static UsersVM SetSubData(Users item, Guid aid)
        {
            var model = UsersVM.MToVM(item);

            model.DateTimeData = DateTimeStorageVM.MToVM(DateTimeStorageService.GetByOID(item.DateTimeStorageID, aid).FirstOrDefault());
            model.ProfileImage = ImageLinkStorageVM.MToVM(ImageLinkStorageService.GetByIDAdmin(item.ProfileImageID));
            return(model);
        }
        public static UsersVM SetSubDataAdmin(Users item)
        {
            var model = UsersVM.MToVM(item);

            model.DateTimeData = DateTimeStorageVM.MToVM(DateTimeStorageService.GetByID(item.DateTimeStorageID));
            model.ProfileImage = ImageLinkStorageVM.MToVM(ImageLinkStorageService.GetByIDAdmin(item.ProfileImageID));
            return(model);
        }
        public static GroupingsDataVM SetSubDataMessagingRoom(GroupingsData model, Guid aid)
        {
            var data = SetSubData(model, aid);

            data.User          = UsersVM.MToVM(UsersService.GetByID(model.OwnerID));
            data.MessagingRoom = MessagingRoomVM.MToVM(MessagingRoomService.GetByID(model.SourceID, aid));
            return(data);
        }