public UnitOfWork(IConfiguration configuration, ILogger logger) { Logger = logger.ForContext <UnitOfWork>(); Context = new GoFlexContext(configuration["ConnectionStrings:DefaultConnection"]); Logger.Debug("Database connection established: {DataSource}", Context.Database.Connection.DataSource); }
protected Repository(GoFlexContext context) { this.context = context; dbSet = context.Set <TEntity>(); }