src/fursvp.data/RepositoryDecorators/RepositoryWithAuthorization.cs
/// <summary>
/// Persists a new document representing the entity to the repository if the user is authorized.
/// </summary>
/// <param name="entity">The entity to persist to the repository.</param>
/// <returns>An asynchronous <see cref="Task{T}"/>.</returns>
Persists a new document representing the entity to the repository if the user is authorized.
Persists a new document representing the entity to the repository if the user is authorized .
public async Task Insert(T entity)
        {
            Authorize.WriteAuthorize(default, entity);
            await Decorated.Insert(entity).ConfigureAwait(false);
        }
public async Task Insert ( T entity ) { Authorize . WriteAuthorize ( default , entity ) ; await Decorated . Insert ( entity ) . ConfigureAwait ( false ) ; }
Persists a new document representing the entity to the repository if the user is authorized.
Persists a new document representing the entity to the repository if the user is authorized .
An asynchronous .
An asynchronous .
entity
T
The entity to persist to the repository.
The entity to persist to the repository .