private void CreateAdminRole() { var adminRole = _roleProvider.Get(null, "sdl_admin"); var isEmpty = adminRole.Sid == null; var adminRoleGroup = _roleProvider.TryCreateGroup(adminRole); adminRole.Sid = adminRoleGroup.Sid; _projectRepository.Save(); if (isEmpty) { _roleProvider.AddUser(adminRole.Id, WindowsIdentity.GetCurrent().User?.Value); } }