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