Ejemplo n.º 1
0
 public Workflow ToModel()
 {
     List<WorkflowStep> steps = new List<WorkflowStep>();
     var workflow = new Workflow();
     workflow.Id = this.Id;
     workflow.Url = this.Url;
     workflow.Name = this.Name;
     foreach (var step in this.WorkflowSteps)
     {
         steps.Add(step.ToModel());
     }
     return workflow;
 }
Ejemplo n.º 2
0
        internal static WorkflowVm FromModel(Workflow workflow)
        {
            List<WorkflowStepVm> steps = new List<WorkflowStepVm>();

            WorkflowVm vm = new WorkflowVm();
            vm.Id = workflow.Id;
            vm.Url = workflow.Url;
            vm.Name = workflow.Name;
            foreach (var step in workflow.WorkflowSteps)
            {
                steps.Add(WorkflowStepVm.FromModel(step));
            }
            vm.WorkflowSteps = steps;
            return vm;
        }