Наследование: ISimpleEmployeeRepository
Пример #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);
            }
        }
Пример #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);
            }
        }
Пример #3
0
        public void Dapper_CrudTest()
        {
            var repo = new EmployeeRepositoryDapper(ConfigurationManager.ConnectionStrings["CodeFirstModels"].ConnectionString);

            CrudTest(s_DapperRepo);
        }
Пример #4
0
 public void Dapper_CrudTest()
 {
     var repo = new EmployeeRepositoryDapper(ConfigurationManager.ConnectionStrings["CodeFirstModels"].ConnectionString);
     CrudTest(s_DapperRepo);
 }