31 lines
833 B
C#
31 lines
833 B
C#
|
|
|
|
namespace Lux.Report.Data.Repository
|
|
{
|
|
public abstract class BaseRepRepository : IBaseRepRepository
|
|
{
|
|
#region Protected Fields
|
|
|
|
protected readonly IDbContextFactory<ReportContext> _ctxFactory;
|
|
|
|
#endregion Protected Fields
|
|
|
|
#region Protected Constructors
|
|
|
|
protected BaseRepRepository(IDbContextFactory<ReportContext> ctxFactory)
|
|
=> _ctxFactory = ctxFactory;
|
|
|
|
#endregion Protected Constructors
|
|
|
|
#region Protected Methods
|
|
|
|
/// <summary>
|
|
/// Creazione dbcontext per singola transazione
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
protected async Task<ReportContext> CreateContextAsync()
|
|
=> await _ctxFactory.CreateDbContextAsync();
|
|
|
|
#endregion Protected Methods
|
|
}
|
|
} |