Ejemplo n.º 1
0
        public static DTO.FeatureSearchGroup ToDto(this Display.FeatureSearchGroup displayEntity)
        {
            var dto = new DTO.FeatureSearchGroup(
                displayEntity.Name,
                displayEntity.ItemCount,
                displayEntity.SearchGroupId,
                displayEntity.SearchGroupKey,
                displayEntity.ParentName,
                displayEntity.IsNameChanged,
                displayEntity.IsSearchKeyChanged,
                displayEntity.CanNameChange,
                displayEntity.CanSearchKeyChange,
                displayEntity.Sort);

            return(dto);
        }
Ejemplo n.º 2
0
        public static Display.FeatureSearchGroup ToDisplayEntity(this DTO.FeatureSearchGroup dto)
        {
            var displayEntity = new Display.FeatureSearchGroup();

            displayEntity.SearchGroupId      = dto.SearchGroupId;
            displayEntity.SearchGroupKey     = dto.SearchGroupKey;
            displayEntity.ItemCount          = (short)dto.ItemCount;
            displayEntity.Name               = dto.Name;
            displayEntity.ParentName         = dto.ParentName;
            displayEntity.IsNameChanged      = dto.IsNameChanged;
            displayEntity.CanNameChange      = dto.CanNameChange;
            displayEntity.CanSearchKeyChange = dto.CanSearchGroupChange;
            displayEntity.IsSearchKeyChanged = dto.IsSearchGroupChanged;
            displayEntity.Sort               = dto.Sort;

            displayEntity.IsDirty = false;

            return(displayEntity);
        }