/// <summary> /// /// </summary> /// <param name="connectionString"></param> /// <param name="mappings"></param> /// <param name="logger"></param> /// <param name="contextConfiguration"></param> /// <param name="typesConfigured"></param> public AggregateConfiguration(string connectionString, IMappingConfiguration[] mappings, ILog logger, IContextConfiguration contextConfiguration, params Type[] typesConfigured) { ConnectionString = connectionString; Mappings = mappings; Logger = logger ?? new NoOpLogger(); ContextConfiguration = contextConfiguration ?? new DefaultContextConfiguration(); TypesConfigured = typesConfigured; }
public MemoryContext(IContextConfiguration configuration) : base(configuration) { _storeSet = new Dictionary <Type, object>(); _storeSet.Add(typeof(UserModel), new List <UserModel>()); _storeSet.Add(typeof(ListModel), new List <ListModel>()); _storeSet.Add(typeof(ListItemModel), new List <ListItemModel>()); _userRepository = new UserRepository(this); _listRepository = new ListRepository(this); _listItemRepository = new ListItemRepository(this); _nextIds = new Dictionary <Type, int>(); _nextIds.Add(typeof(UserModel), 1); _nextIds.Add(typeof(ListModel), 1); _nextIds.Add(typeof(ListItemModel), 1); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, IContextConfiguration context) { context.Migrate(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler("/Home/Error"); } app.UseMvc(); app.UseStaticFiles(); }
/// <summary> /// Creates a repository factory for the supplied list of domains /// </summary> public RepositoryFactory(string connectionString, IMappingConfiguration mappings, IContextConfiguration contextConfig, ILog logger) { _connectionString = connectionString; _mappings = mappings; _contextConfig = contextConfig; _logger = logger; }
/// <summary> /// Creates a repository factory for the supplied list of domains /// </summary> public RepositoryFactory(string connectionString, IMappingConfiguration mappings, IContextConfiguration contextConfiguration) : this(connectionString, mappings, contextConfiguration, new NoOpLogger()) { }
public IClientContext CreateContext(IContextConfiguration configuration) { return new SDataClientContext((SDataContextConfiguration)configuration); }
public static IClientContext GetContext(IClientContextFactory factory, IContextConfiguration configuration) { return factory.CreateContext(configuration); }
public HighwayDataContext(string connectionString, IMappingConfiguration mapping, IContextConfiguration contextConfiguration, ILog log) : base(connectionString, mapping, contextConfiguration, log) { }
/// <summary> /// Constructs a context /// </summary> /// <param name="connectionString">The standard SQL connection string for the Database</param> /// <param name="mapping">The Mapping Configuration that will determine how the tables and objects interact</param> /// <param name="contextConfiguration"> /// The context specific configuration that will change context level behavior ( /// Optional ) /// </param> public DataContext(string connectionString, IMappingConfiguration mapping, IContextConfiguration contextConfiguration) : this(connectionString, mapping, contextConfiguration, new NoOpLogger()) { }
public HighwayDataContext(string connectionString, IMappingConfiguration mapping, IContextConfiguration contextConfiguration, ILog log) : base(connectionString, mapping, contextConfiguration, log) { }
public UsersDataContext(IContextConfiguration config) { _config = config; }
public EffectiveTablesContext(IContextConfiguration configuration) { _configuration = configuration; }
public HighwayDataContext(IConnectionStringConfig config, IMappingConfiguration mapping, IContextConfiguration contextConfiguration, ILog log) : base(config.ConnectionString, mapping, contextConfiguration, log) { string msg = System.Configuration.ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString; }
public MigrationsDataContext(string connectionString, IMappingConfiguration mapping, IContextConfiguration contextConfiguration) : base(connectionString, mapping, contextConfiguration) { }
public Context(IContextConfiguration configuration) : base(configuration.GetDbContextOptions()) { }
public IClientContext CreateContext(IContextConfiguration configuration) { return new HibernateClientContext((HibernateContextConfiguration)configuration); }