Ejemplo n.º 1
0
        public static Display.ModuleFeatureStep ToDisplayEntity(this DTO.ModuleFeatureStep dto)
        {
            var result = new Display.ModuleFeatureStep();

            result.Type  = dto.Type;
            result.Sort  = dto.Sort;
            result.Name  = dto.Name;
            result.Title = dto.Title;

            //if (dto.Advisors != null)
            //{
            //    foreach (var advisor in dto.Advisors)
            //    {
            //        result.Advisors.Add(advisor.ToDisplayEntity());
            //    }
            //}

            //if (dto.Errors != null)
            //{
            //    foreach (var error in dto.Errors)
            //    {
            //        result.Errors.Add(error.ToDisplayEntity());
            //    }
            //}

            //if (dto.Actions != null)
            //{
            //    foreach (var action in dto.Actions)
            //    {
            //        result.Actions.Add(action.ToDisplayEntity());
            //    }
            //}

            return(result);
        }
Ejemplo n.º 2
0
        public static DTO.ModuleFeatureStep ToDto(this Display.ModuleFeatureStep displayEntity)
        {
            var advisors = new List <DTO.ModuleFeatureStepAdvisor>();

            //if (displayEntity.Advisors != null)
            //{
            //    foreach (Display.Advisor advisor in displayEntity.Advisors)
            //    {
            //        advisors.Add(advisor.ToDto());
            //    }
            //}

            //var errors = new List<DTO.ModuleFeatureStepError>();
            //if (displayEntity.Errors != null)
            //{
            //    foreach (Display.Error error in displayEntity.Errors)
            //    {
            //        errors.Add(error.ToDto());
            //    }
            //}

            //var actions = new List<DTO.ModuleFeatureStepAction>();
            //if (displayEntity.Actions != null)
            //{
            //    foreach (Display.Action item in displayEntity.Actions)
            //    {
            //        actions.Add(item.ToDto());
            //    }
            //}

            var dto = new DTO.ModuleFeatureStep(
                displayEntity.Name,
                displayEntity.Title,
                displayEntity.Sort,
                displayEntity.Type
                //actions,
                //advisors,
                //errors
                )
            ;

            return(dto);
        }