public async Task <UserGroupsDataModel> GetUserGroupsAsync(Interfaces.IRepository repo, string game, string user)
        {
            var userObj = await repo.GetUser(user);

            if (userObj == null)
            {
                UserGroupsDataModel empty = new UserGroupsDataModel
                {
                    UserName = "******"
                };

                return(empty);
            }

            var gameGroups = await repo.GetGroupsAsync(game);

            UserGroupsDataModel userGroups = new UserGroupsDataModel {
                UserName = user, Game = game
            };

            userGroups.UserGroups = from g in gameGroups
                                    join ug in userObj.Groups on g.id equals ug
                                    select new GroupNameModel
            {
                Id   = g.id,
                Name = g.Name
            };

            userGroups.OtherGroups = from g in gameGroups.Where(g => !userObj.Groups.Contains(g.id))
                                     select new GroupNameModel
            {
                Id   = g.id,
                Name = g.Name
            };

            return(userGroups);
        }
 public async Task <IEnumerable <Models.GroupDataModel> > GetGameGroupsAsync(Interfaces.IRepository repo, string game)
 {
     return(await repo.GetGroupsAsync(game));
 }