async Task <IdentityResult> IRoleStore <TRole> .CreateAsync(TRole role, CancellationToken cancellationToken) { var found = _collection.FindByNameAsync(role.NormalizedName); if (found == null) { await _collection.CreateAsync(role); } return(IdentityResult.Success); }
public async Task <TRole> CreateAsync(TRole obj) { return(await ExecuteWithLog(async() => await _Collection.CreateAsync(obj))); }