public void Execute(ScenarioEntity scenario)
 {
     foreach (var scenarioAction in scenario.Actions.OrderBy(x => x.Order))
     {
         ExecuteAction(scenarioAction);
     }
 }
 public static ScenarioViewModel ToScenarioViewModel(ScenarioEntity entity)
 {
     return(new ScenarioViewModel
     {
         Id = entity.Id,
         Name = entity.Name
     });
 }
 public static ScenarioCreationViewModel ToScenarioCreationViewModel(ScenarioEntity entity)
 {
     return(new ScenarioCreationViewModel
     {
         Id = entity.Id,
         FolderId = entity.FolderId,
         Name = entity.Name,
         Actions = entity.Actions
                   .Select(ActionMapper.ToActionViewModel)
                   .ToList()
     });
 }