Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
 public Tests(SimpleCRUD.Dialect dbtype)
 {
     _dbtype = dbtype;
 }
Exemplo n.º 3
0
 public static void SetDialect(SimpleCRUD.Dialect dbType)
 {
     _dbtype = dbType;
     SimpleCRUD.SetDialect(dbType);
 }
Exemplo n.º 4
0
 public BaseRepo(SimpleCRUD.Dialect dbtype)
 {
     _dbtype = dbtype;
 }
Exemplo n.º 5
0
 static DbSwitcher()
 {
     _dbtype = SimpleCRUD.Dialect.MySQL;
 }
Exemplo n.º 6
0
 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 <,>));
 }
Exemplo n.º 7
0
 private static void RunTests(object tester, SimpleCRUD.Dialect dialect, params string[] excludeTestsContaining)
 {
     RunTests(tester, " in " + dialect, excludeTestsContaining);
 }
Exemplo n.º 8
0
 private static void RunTests(SimpleCRUD.Dialect dialect, params string[] excludeTestsContaining)
 {
     RunTests(new Tests(dialect), dialect, excludeTestsContaining);
 }
Exemplo n.º 9
0
 public OrderHeaderRepo(SimpleCRUD.Dialect dbtype) : base(dbtype)
 {
 }