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; }
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); }