public async Task <WizardStepItem> CreateStepItem(int stepId, WizardStepItem wizardStepItem) { var step = await _wizardStepRepository.Get(stepId); if (step == null) { throw new InvalidOperationException($"Step with id : {stepId} not found to create a new item!"); } wizardStepItem.Step = step; return(await _wizardStepItemRepository.Add(wizardStepItem)); }
public Task <WizardStepItem> UpdateStepItem(int stepItemId, WizardStepItem stepItem) => _wizardStepItemRepository.Update(stepItemId, stepItem);