public void Update(ApplicationRole AppRole) { if (_appRoleRepository.CheckContains(x => x.Description == AppRole.Description && x.Id != AppRole.Id)) { throw new NameDuplicatedException("Tên không được trùng"); } _appRoleRepository.Update(AppRole); }
public void Update(IdentityRole AppRole) { if (_appRoleRepository.CheckContains(x => x.Name == AppRole.Name && x.Id != AppRole.Id)) { throw new NameDuplicatedException("Tên không được trùng"); } _appRoleRepository.Update(AppRole); }
public async Task <IdentityResult> UpdateAsync(ApplicationRole role, CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); await roleRepository.Update(role); return(IdentityResult.Success); }
public void Update(ApplicationRole appRole) { _applicationRoleRepository.Update(appRole); }