/// <summary> /// 测试初始化 /// </summary> public ProductRepositoryTest() { _scope = Ioc.BeginScope(); _unitOfWork = _scope.Create <ISqlServerUnitOfWork>(); _productRepository = _scope.Create <IProductRepository>(); _random = new Util.Helpers.Random(); }
/// <summary> /// 测试初始化 /// </summary> public SqlQueryTest() { _scope = Ioc.BeginScope(); _unitOfWork = _scope.Create <ISqlServerUnitOfWork>(); _customerRepository = _scope.Create <ICustomerRepository>(); _query = _scope.Create <ISqlQuery>(); }
/// <summary> /// 测试初始化 /// </summary> public ProductRepositoryTest() { _container = Ioc.CreateContainer(new IocConfig()); _unitOfWork = _container.Create <ISqlServerUnitOfWork>(); _productRepository = _container.Create <IProductRepository>(); _random = new Util.Helpers.Random(); }
/// <summary> /// 测试初始化 /// </summary> public ProductRepositoryTest() { Ioc.Register(new IocConfig()); _unitOfWork = Ioc.Create <ISqlServerUnitOfWork>(); _productRepository = Ioc.Create <IProductRepository>(); _random = new Util.Helpers.Random(); }
/// <summary> /// 测试初始化 /// </summary> public SqlQueryTest(ITestOutputHelper output) { _output = output; _scope = Ioc.BeginScope(); _unitOfWork = _scope.Create <ISqlServerUnitOfWork>(); _customerRepository = _scope.Create <ICustomerRepository>(); _query = _scope.Create <ISqlQuery>(); }
/// <summary> /// 测试初始化 /// </summary> public SqlQueryTest(ITestOutputHelper output) { _output = output; _scope = Ioc.BeginScope(); _unitOfWork = _scope.Create <ISqlServerUnitOfWork>(); _customerRepository = _scope.Create <ICustomerRepository>(); _query = _scope.Create <ISqlQuery>(); _query.Config(t => t.IsClearAfterExecution = false); }
/// <summary> /// 测试初始化 /// </summary> public CustomerRepositoryTest() { _container = Ioc.CreateContainer(new IocConfig()); _unitOfWork = _container.Create <ISqlServerUnitOfWork>(); _customerRepository = _container.Create <ICustomerRepository>(); }
/// <summary> /// 初始化商品持久化存储 /// </summary> /// <param name="unitOfWork">工作单元</param> public ProductPoStore(ISqlServerUnitOfWork unitOfWork) : base(unitOfWork) { }
/// <summary> /// 初始化客户服务 /// </summary> /// <param name="unitOfWork">工作单元</param> /// <param name="customersRepository">客户仓储</param> public CustomersService(ISqlServerUnitOfWork unitOfWork, ICustomerRepository customersRepository) : base(unitOfWork, customersRepository) { CustomersRepository = customersRepository; }
public ExampleController(ISqlServerUnitOfWork unitOfWork, IExampleQuery exampleQuery, IExampleService exampleService) { UnitOfWork = unitOfWork; ExampleQuery = exampleQuery; ExampleService = exampleService; }
public ExampleService(ISqlServerUnitOfWork unitOfWork) { UnitOfWork = unitOfWork; }
public CustomerController(ICustomerRepository customerRepository, ISqlServerUnitOfWork unitOfWork, ICustomersService customersService) { CustomerRepository = customerRepository; UnitOfWork = unitOfWork; CustomersService = customersService; }
/// <summary> /// 初始化客户仓储 /// </summary> /// <param name="unitOfWork">工作单元</param> public CustomerRepository(ISqlServerUnitOfWork unitOfWork) : base(unitOfWork) { }
/// <summary> /// 初始化订单仓储 /// </summary> /// <param name="unitOfWork">工作单元</param> public OrderRepository(ISqlServerUnitOfWork unitOfWork) : base(unitOfWork) { }
protected KnstSqlServerContext(ISqlServerUnitOfWork unitOfWork) : base(unitOfWork) { }
/// <summary> /// 测试初始化 /// </summary> public OrderRepositoryTest() { Ioc.Register(new IocConfig()); _unitOfWork = Ioc.Create <ISqlServerUnitOfWork>(); _orderRepository = Ioc.Create <IOrderRepository>(); }
public HomeController(IOrderRepository orderRepository, ICustomerRepository customerRepository, ISqlServerUnitOfWork unitOfWork) { _orderRepository = orderRepository; _customerRepository = customerRepository; _unitOfWork = unitOfWork; }