public static bool DeleteUserGroupRights(int userGroupId) { using (var uow = new DAL.UnitOfWork()) { uow.UserGroupRightRepository.DeleteRange(x => x.UserGroupId == userGroupId); return uow.Save(); } }