public async Task GetByIdAsync() { var role = await _identityRoleManager.FindByIdAsync(_testData.RoleModeratorId.ToString()); role.ShouldNotBeNull(); role.Name.ShouldBe("moderator"); }
public async Task DeleteAsync(Guid id) { var role = await _roleManager.FindByIdAsync(id.ToString()); if (role == null) { return; } (await _roleManager.DeleteAsync(role)).CheckErrors(); }
public virtual async Task DeleteAsync(Guid id) { var role = await _roleManager.FindByIdAsync(id.ToString()).ConfigureAwait(false); if (role == null) { return; } (await _roleManager.DeleteAsync(role).ConfigureAwait(false)).CheckErrors(); }