Esempio n. 1
0
        private static void MeasureEmit()
        {
            DynamicDataMapper customer = EmitDataMapper.Build(typeof(Customer), connStr, false);

            customer.GetAll();
            customer.GetById("ALFKI");
        }
Esempio n. 2
0
 public ProductEmitDataMapperTest() : base(
         EmitDataMapper.Build(typeof(Product), NORTHWIND, false),
         EmitDataMapper.Build(typeof(Category), NORTHWIND, false),
         EmitDataMapper.Build(typeof(Supplier), NORTHWIND, false)
         )
 {
 }
Esempio n. 3
0
        public static void EmployeeEmit()
        {
            IDataMapper test   = EmitDataMapper.Build(typeof(Employee), connStr, true);
            object      id     = test.Insert(tester);
            IEnumerable res    = test.GetAll();
            Employee    actual = (Employee)test.GetById(id);

            test.Delete(actual);
            Employee original = (Employee)test.GetById(1);

            test.Update(tester);
            test.Update(original);
        }
Esempio n. 4
0
        public static void CustomerEmit()
        {
            IDataMapper test   = EmitDataMapper.Build(typeof(Customer), connStr, true);
            object      id     = test.Insert(insertTestC);
            IEnumerable res    = test.GetAll();
            Customer    actual = (Customer)test.GetById(id);

            test.Delete(actual);
            Customer original = (Customer)test.GetById("ALFKI");

            test.Update(updateTestC);
            test.Update(original);
        }
Esempio n. 5
0
        public static void ProductEmit()
        {
            IDataMapper test       = EmitDataMapper.Build(typeof(Product), connStr, true);
            IDataMapper categories = EmitDataMapper.Build(typeof(Category), connStr, true);
            IDataMapper suppliers  = EmitDataMapper.Build(typeof(Supplier), connStr, true);

            Category c = (Category)categories.GetById(4);
            Supplier s = (Supplier)suppliers.GetById(17);

            object      id     = test.Insert(ProductBuilder(c, s));
            IEnumerable res    = test.GetAll();
            Product     actual = (Product)test.GetById(id);

            test.Delete(actual);

            Product original = (Product)test.GetById(10);

            c = (Category)categories.GetById(4);
            s = (Supplier)suppliers.GetById(17);


            test.Update(ProductBuilder(c, s));
            test.Update(original);
        }
Esempio n. 6
0
 public RegionEmitDataMapperTest() : base(EmitDataMapper.Build(typeof(Region), NORTHWIND, false))
 {
 }
 public CategoryEmitDataMapperTest() : base(EmitDataMapper.Build(typeof(Category), NORTHWIND, false))
 {
 }
Esempio n. 8
0
 public CustomerDataMapperTest()
 {
     //customers = new CustomerDataMapper(typeof (Customer), NORTHWIND, false);
     customers = EmitDataMapper.Build(typeof(Customer), NORTHWIND, false);
 }
 public EmployeeEmitDataMapperTest() : base(EmitDataMapper.Build(typeof(Employee), NORTHWIND, true))
 {
 }
Esempio n. 10
0
 public CustomerEmitDataMapperTest() : base(EmitDataMapper.Build(typeof(Customer), NORTHWIND, true))
 {
 }