src/fursvp.data/RepositoryDecorators/RepositoryWithValidation.cs
/// <summary>
/// Persists a new document representing the entity to the repository if the state is valid.
/// </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 state is valid.
Persists a new document representing the entity to the repository if the state is valid .
public async Task Insert(T entity)
        {
            Validator.ValidateState(default, entity);
            await Decorated.Insert(entity).ConfigureAwait(false);
        }
public async Task Insert ( T entity ) { Validator . ValidateState ( default , entity ) ; await Decorated . Insert ( entity ) . ConfigureAwait ( false ) ; }
Persists a new document representing the entity to the repository if the state is valid.
Persists a new document representing the entity to the repository if the state is valid .
An asynchronous .
An asynchronous .
entity
T
The entity to persist to the repository.
The entity to persist to the repository .