src/fursvp.data/RepositoryDecorators/CachingRepository.cs
/// <summary>
/// Searches for a newer version of an entity in the database if it exists and returns it if found.
/// If found, the newer version is saved to the cache.
/// </summary>
/// <param name="guid">The globally unique identifier for the entity.</param>
/// <param name="version">The presumed most recent version of the entity document.</param>
/// <returns>The newer version of the entity if it exists. Otherwise, default(T).</returns>
Searches for a newer version of an entity in the database if it exists and returns it if found.
If found, the newer version is saved to the cache.
Searches for a newer version of an entity in the database if it exists and returns it if found . If found the newer version is saved to the cache .
public async Task<T> GetNewerVersionIfExists(Guid guid, int version)
        {
            var entity = await Decorated.GetNewerVersionIfExists(guid, version).ConfigureAwait(false);
            if (entity != null)
            {
                CacheCopyOfEntity(entity);
            }
            return Mapper.Map<T, T>(entity);
        }
public async Task < T > GetNewerVersionIfExists ( Guid guid , int version ) { var entity = await Decorated . GetNewerVersionIfExists ( guid , version ) . ConfigureAwait ( false ) ; if ( entity != null ) { CacheCopyOfEntity ( entity ) ; } return Mapper . Map < T , T > ( entity ) ; }
Searches for a newer version of an entity in the database if it exists and returns it if found.
Searches for a newer version of an entity in the database if it exists and returns it if found .
The newer version of the entity if it exists. Otherwise, default(T).
The newer version of the entity if it exists . Otherwise default ( T ) .
guid
Guid
The globally unique identifier for the entity.
The globally unique identifier for the entity .
version
int
The presumed most recent version of the entity document.
The presumed most recent version of the entity document .