Пример #1
0
 public async Task <List <StepArtifactOption> > GetAllStepArtifactOptions(ulong stepArtifactId)
 {
     using (var db = await DbConnectionFactory.OpenAsync())
     {
         return(await db.GetAllStepArtifactOptions(stepArtifactId));
     }
 }
Пример #2
0
 public async Task <Step> Get(ulong stepId)
 {
     using (var db = await DbConnectionFactory.OpenAsync())
     {
         return(await db.GetStep(stepId));
     }
 }
Пример #3
0
 public async Task <bool> DoesStepArtifactExist(string batchId, string stepName, string artifactName)
 {
     using (var db = await DbConnectionFactory.OpenAsync())
     {
         return(await db.DoesStepArtifactExist(batchId, stepName, artifactName));
     }
 }
Пример #4
0
 public async Task <StepArtifact> GetStepArtifact(ulong id)
 {
     using (var db = await DbConnectionFactory.OpenAsync())
     {
         return(await db.GetStepArtifact(id));
     }
 }
Пример #5
0
 public async Task UpdateStepArtifact(StepArtifact stepArtifact)
 {
     using (var db = await DbConnectionFactory.OpenAsync())
     {
         await db.UpdateStepArtifact(stepArtifact);
     }
 }
Пример #6
0
 public async Task <List <Step> > GetAll(string batchId)
 {
     using (var db = await DbConnectionFactory.OpenAsync())
     {
         return(await db.GetAllSteps(batchId));
     }
 }
Пример #7
0
 public async Task UpdateState(string batchId, BatchState state)
 {
     using (var db = await DbConnectionFactory.OpenAsync())
     {
         await db.UpdateBatchState(batchId, state);
     }
 }
Пример #8
0
 public async Task <CommandVariable> GetCommandVariable(ulong id)
 {
     using (var db = await DbConnectionFactory.OpenAsync())
     {
         return(await db.GetCommandVariable(id));
     }
 }
Пример #9
0
 public async Task UpdateState(ulong id, CommandState state)
 {
     using (var db = await DbConnectionFactory.OpenAsync())
     {
         await db.UpdateCommandState(id, state);
     }
 }
Пример #10
0
 public async Task <bool> DoesCommandExist(string batchId, string stepName, string commandName)
 {
     using (var db = await DbConnectionFactory.OpenAsync())
     {
         return(await db.DoesCommandExist(batchId, stepName, commandName));
     }
 }
Пример #11
0
 public async Task <List <CommandOption> > GetAllCommandOptions(ulong commandId)
 {
     using (var db = await DbConnectionFactory.OpenAsync())
     {
         return(await db.GetAllCommandOptions(commandId));
     }
 }
Пример #12
0
 public async Task <bool> DoesBatchVariableExist(string batchId, string variableName)
 {
     using (var db = await DbConnectionFactory.OpenAsync())
     {
         return(await db.DoesBatchVariableExist(batchId, variableName));
     }
 }
Пример #13
0
 public async Task <ulong> CreateOrUpdateCommandOption(CommandOption option)
 {
     using (var db = await DbConnectionFactory.OpenAsync())
     {
         return(await db.CreateOrUpdateCommandOption(option));
     }
 }
Пример #14
0
 public async Task <ulong> CreateOrUpdateCommandVariable(CommandVariable variable)
 {
     using (var db = await DbConnectionFactory.OpenAsync())
     {
         return(await db.CreateOrUpdateCommandVariable(variable));
     }
 }
Пример #15
0
 public async Task <List <BatchVariable> > GetAllBatchVariables(string batchId)
 {
     using (var db = await DbConnectionFactory.OpenAsync())
     {
         return(await db.GetAllBatchVariables(batchId));
     }
 }
Пример #16
0
 public async Task <ulong> CreateStepArtifact(StepArtifact stepArtifact)
 {
     using (var db = await DbConnectionFactory.OpenAsync())
     {
         return(await db.CreateOrUpdateStepArtifact(stepArtifact));
     }
 }
Пример #17
0
 public async Task <bool> DoesBatchExist(string batchId)
 {
     using (var db = await DbConnectionFactory.OpenAsync())
     {
         return(await db.DoesBatchExist(batchId));
     }
 }
Пример #18
0
 public async Task <bool> DoesBatchArtifactOptionExist(string batchId, string artifactName, string optionName)
 {
     using (var db = await DbConnectionFactory.OpenAsync())
     {
         return(await db.DoesBatchArtifactOptionExist(batchId, artifactName, optionName));
     }
 }
Пример #19
0
 public async Task <Batch> Get(string batchId)
 {
     using (var db = await DbConnectionFactory.OpenAsync())
     {
         return(await db.GetBatch(batchId));
     }
 }
Пример #20
0
 public async Task <List <BatchArtifactOption> > GetAllBatchArtifactOptions(ulong artifactName)
 {
     using (var db = await DbConnectionFactory.OpenAsync())
     {
         return(await db.GetAllBatchArtifactOptions(artifactName));
     }
 }
Пример #21
0
 public async Task <BatchArtifactOption> GetBatchArtifactOption(ulong id)
 {
     using (var db = await DbConnectionFactory.OpenAsync())
     {
         return(await db.GetBatchArtifactOption(id));
     }
 }
Пример #22
0
 public async Task UpdateBatchArtifact(BatchArtifact batchArtifact)
 {
     using (var db = await DbConnectionFactory.OpenAsync())
     {
         await db.UpdateBatchArtifact(batchArtifact);
     }
 }
Пример #23
0
 public async Task <List <Command> > GetAll(ulong stepId)
 {
     using (var db = await DbConnectionFactory.OpenAsync())
     {
         return(await db.GetAllCommands(stepId));
     }
 }
Пример #24
0
 public async Task <List <StepVariable> > GetAllStepVariables(ulong stepId)
 {
     using (var db = await DbConnectionFactory.OpenAsync())
     {
         return(await db.GetAllStepVariables(stepId));
     }
 }
Пример #25
0
 protected async Task <object> WithDbAsync(Func <IDbConnection, Task <object> > operation)
 {
     using (var db = await DbConnectionFactory.OpenAsync())
     {
         Logic.Init(db, GetSession(), Request, AppSettings);
         return(await operation(db));
     }
 }
Пример #26
0
        public async Task <CommandVariable> GetCommandVariable(ulong commandId, string variableName)
        {
            using (var db = await DbConnectionFactory.OpenAsync())
            {
                var id = await db.GetCommandVariablePkByVariableName(commandId, variableName);

                return(await db.GetCommandVariable(id));
            }
        }
Пример #27
0
        public async Task <BatchVariable> GetBatchVariable(string batchId, string variableName)
        {
            using (var db = await DbConnectionFactory.OpenAsync())
            {
                var id = await db.GetBatchVariablePkByVariableName(batchId, variableName);

                return(await db.GetBatchVariable(id));
            }
        }
Пример #28
0
        public async Task <bool> Update(Command command)
        {
            using (var db = await DbConnectionFactory.OpenAsync())
            {
                var rowsUpdated = await db.UpdateCommand(command);

                return(rowsUpdated > 0);
            }
        }
Пример #29
0
        public async Task <CommandOption> GetCommandOption(ulong commandId, string optionName)
        {
            using (var db = await DbConnectionFactory.OpenAsync())
            {
                var id = await db.GetCommandOptionPkByOptionName(commandId, optionName);

                return(await db.GetCommandOption(id));
            }
        }
Пример #30
0
        public async Task <Command> Get(ulong stepId, string commandName)
        {
            using (var db = await DbConnectionFactory.OpenAsync())
            {
                var id = await db.GetCommandPkByCommandName(stepId, commandName);

                return(await db.GetCommand(id));
            }
        }