private static void MeasureEmit() { DynamicDataMapper customer = EmitDataMapper.Build(typeof(Customer), connStr, false); customer.GetAll(); customer.GetById("ALFKI"); }
public ProductEmitDataMapperTest() : base( EmitDataMapper.Build(typeof(Product), NORTHWIND, false), EmitDataMapper.Build(typeof(Category), NORTHWIND, false), EmitDataMapper.Build(typeof(Supplier), NORTHWIND, false) ) { }
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); }
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); }
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); }
public RegionEmitDataMapperTest() : base(EmitDataMapper.Build(typeof(Region), NORTHWIND, false)) { }
public CategoryEmitDataMapperTest() : base(EmitDataMapper.Build(typeof(Category), NORTHWIND, false)) { }
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)) { }
public CustomerEmitDataMapperTest() : base(EmitDataMapper.Build(typeof(Customer), NORTHWIND, true)) { }