Inheritance: ISimpleEmployeeRepository
Beispiel #1
0
        public static void AssemblyInit(TestContext context)
        {
            s_DataSource                = SqlServerDataSource.CreateFromConfig("CodeFirstModels");
            s_DapperRepo                = new EmployeeRepositoryDapper(ConfigurationManager.ConnectionStrings["CodeFirstModels"].ConnectionString);
            s_ChainRepo                 = new EmployeeRepositoryChain(SqlServerDataSource.CreateFromConfig("CodeFirstModels"));
            s_ChainCompiledRepo         = new EmployeeRepositoryChainCompiled(SqlServerDataSource.CreateFromConfig("CodeFirstModels"));
            s_EFIntermediateRepo        = new EmployeeRepositoryEF_Intermediate();
            s_EFIntermediateNoTrackRepo = new EmployeeRepositoryEF_Intermediate_NoTrack();
            s_EFNoviceRepo              = new EmployeeRepositoryEF_Novice();

            if (Warmup)
            {
                CrudTestCore(s_DapperRepo);
                CrudTestCore(s_ChainRepo);
                CrudTestCore(s_ChainCompiledRepo);
                CrudTestCore(s_EFIntermediateRepo);
                CrudTestCore(s_EFIntermediateNoTrackRepo);
                CrudTestCore(s_EFNoviceRepo);
            }
        }
Beispiel #2
0
        public static void AssemblyInit(TestContext context)
        {
            s_DataSource = SqlServerDataSource.CreateFromConfig("CodeFirstModels");
            s_DapperRepo = new EmployeeRepositoryDapper(ConfigurationManager.ConnectionStrings["CodeFirstModels"].ConnectionString);
            s_ChainRepo = new EmployeeRepositoryChain(SqlServerDataSource.CreateFromConfig("CodeFirstModels"));
            s_ChainCompiledRepo = new EmployeeRepositoryChainCompiled(SqlServerDataSource.CreateFromConfig("CodeFirstModels"));
            s_EFIntermediateRepo = new EmployeeRepositoryEF_Intermediate();
            s_EFIntermediateNoTrackRepo = new EmployeeRepositoryEF_Intermediate_NoTrack();
            s_EFNoviceRepo = new EmployeeRepositoryEF_Novice();

            if (Warmup)
            {
                CrudTestCore(s_DapperRepo);
                CrudTestCore(s_ChainRepo);
                CrudTestCore(s_ChainCompiledRepo);
                CrudTestCore(s_EFIntermediateRepo);
                CrudTestCore(s_EFIntermediateNoTrackRepo);
                CrudTestCore(s_EFNoviceRepo);
            }
        }