public ConnectionDetails(String connectionName, Type connectionType = null, SimpleCRUD.Dialect dialect = SimpleCRUD.Dialect.SQLServer) { this.ConnectionName = connectionName; this.ConnectionType = connectionType; this.Dialect = dialect; if (this.ConnectionType == null) { this.ConnectionType = typeof(SqlConnection); } }
public Tests(SimpleCRUD.Dialect dbtype) { _dbtype = dbtype; }
public static void SetDialect(SimpleCRUD.Dialect dbType) { _dbtype = dbType; SimpleCRUD.SetDialect(dbType); }
public BaseRepo(SimpleCRUD.Dialect dbtype) { _dbtype = dbtype; }
static DbSwitcher() { _dbtype = SimpleCRUD.Dialect.MySQL; }
public static void AddUnitOfWork(this IServiceCollection services, Func <DbConnection> connFactoryFunc, SimpleCRUD.Dialect dialect) { SimpleCRUD.SetDialect(dialect); services.AddScoped <Func <DbConnection> >(resolver => () => new TracingDbConnection(connFactoryFunc(), resolver.GetService <ILoggerFactory>())); services.AddTransient <IConnectionFactory, ConnectionFactory>(); services.AddScoped <IUnitOfWork, UnitOfWork>(); services.AddTransient(typeof(IRepository <>), typeof(Repository <>)); services.AddTransient(typeof(IRepository <,>), typeof(Repository <,>)); }
private static void RunTests(object tester, SimpleCRUD.Dialect dialect, params string[] excludeTestsContaining) { RunTests(tester, " in " + dialect, excludeTestsContaining); }
private static void RunTests(SimpleCRUD.Dialect dialect, params string[] excludeTestsContaining) { RunTests(new Tests(dialect), dialect, excludeTestsContaining); }
public OrderHeaderRepo(SimpleCRUD.Dialect dbtype) : base(dbtype) { }