Example #1
0
 public void AddRoleGroup(IEnumerable <ApplicationRoleGroup> appRoles, int groupId)
 {
     _applicationRoleGroupRepository.DeleteMuti(x => x.GroupId == groupId);
     foreach (var userRole in appRoles)
     {
         _applicationRoleGroupRepository.Add(userRole);
     }
 }
 public bool AddRolesToGroup(IEnumerable <ApplicationRoleGroup> roleGroups, int groupId)
 {
     _appRoleGroupRepository.DeleteMulti(x => x.GroupId == groupId);
     foreach (var roleGroup in roleGroups)
     {
         _appRoleGroupRepository.Add(roleGroup);
     }
     return(true);
 }