//
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
//
namespace MUnique.OpenMU.Persistence.EntityFramework;
///
/// Interface for a stack of persistence contexts.
///
internal interface IContextStack
{
///
/// Puts this context on the context stack of the current thread to be used for the upcoming repository actions.
/// If no context is on the context stack of the current thread, a new temporary context will be used for the action.
///
/// The context.
/// The disposable to end the usage.
IDisposable UseContext(IContext context);
///
/// Gets the current context of the current thread.
///
/// The current context.
IContext? GetCurrentContext();
}