public UnitOfWork(FEGBExcavationContext context, ILoggerFactory loggerFactory) { _context = context; _loggerFactory = loggerFactory; _logger = _loggerFactory.CreateLogger <UnitOfWork>(); _logger.LogInformation("Unit of Work with DbContext {contextId} created", _context.ContextId); }
public GenericRepo(FEGBExcavationContext context, ILogger <T> logger) { _context = context; _dbSet = context.Set <T>(); _logger = logger; _logger.LogInformation("{Type} repo with DbContext {ContextID} created", typeof(T), _context.ContextId); }