/// <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> /// 在执行之后清空Sql和参数,默认为 true /// </summary> /// <param name="sqlQuery">Sql查询对象</param> /// <param name="value">是否在执行之后清空Sql和参数,默认为 true</param> public static ISqlQuery ClearAfterExecution(this ISqlQuery sqlQuery, bool value = true) { sqlQuery.Config(t => t.IsClearAfterExecution = value); return(sqlQuery); }