Beispiel #1
0
 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);
 }
Beispiel #2
0
 protected Repository(GoFlexContext context)
 {
     this.context = context;
     dbSet        = context.Set <TEntity>();
 }