Exemple #1
0
        public bool removeAdminFromGroup(Group g, ApplicationUser toDel)
        {
            AdminGroupConnection gConnection = getAdminGroupConnection(g, toDel);

            db.AdminGroupConnections.Remove(gConnection);
            return(db.SaveChanges() != 0);
        }
Exemple #2
0
        public bool addAdminToGroup(Group g, ApplicationUser toAdd)
        {
            AdminGroupConnection gConnection = new AdminGroupConnection();

            gConnection.GroupID = g.ID;
            gConnection.UserID  = toAdd.Id;
            db.AdminGroupConnections.Add(gConnection);
            return(db.SaveChanges() != 0);
        }