public static ScenarioEntity ToScenarioCreation(this ScenarioCreationViewModel model) { return(new ScenarioEntity() { Id = model.Id, FolderId = model.FolderId, Name = model.Name, Actions = model.Actions .Select(x => ActionMapper.ToAction(x, model.Id)) .ToList() }); }
public void Edit(ScenarioCreationViewModel scenarioCreation) { var scenarioEntity = scenarioCreation.ToScenarioCreation(); _scenarioRepository.UpdateByLocal(scenarioEntity); }
public void Create(ScenarioCreationViewModel scenarioCreation) { var scenarioEntity = scenarioCreation.ToScenarioCreation(); _scenarioRepository.Create(scenarioEntity); }