EasyRepository/GenericUnitOfWork.cs
/// <inheritdoc />
/// <summary>
///   The dispose method destroys the database context used with the current UoW.
/// </summary>
The dispose method destroys the database context used with the current UoW.
The dispose method destroys the database context used with the current UoW .
public void Dispose()
        {
            if (this.context != null)
            {
                try
                {
                    this.context.Dispose();
                }
                catch
                {
                }
            }
            if (this.Repository is GenericRepository<TKey> repository)
            {
                repository.BeforeAction -= this.OnBeforeAction;
            }
        }
public void Dispose ( ) { if ( this . context != null ) { try { this . context . Dispose ( ) ; } catch { } } if ( this . Repository is GenericRepository < TKey > repository ) { repository . BeforeAction -= this . OnBeforeAction ; } }
The dispose method destroys the database context used with the current UoW.
The dispose method destroys the database context used with the current UoW .
// ReSharper disable once EmptyGeneralCatchClause // Do nothing // TODO: Consider alternatives to this to something a little cleaner.
inheritdoc
None