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()
     });
 }
示例#2
0
        public void Edit(ScenarioCreationViewModel scenarioCreation)
        {
            var scenarioEntity = scenarioCreation.ToScenarioCreation();

            _scenarioRepository.UpdateByLocal(scenarioEntity);
        }
示例#3
0
        public void Create(ScenarioCreationViewModel scenarioCreation)
        {
            var scenarioEntity = scenarioCreation.ToScenarioCreation();

            _scenarioRepository.Create(scenarioEntity);
        }