Пример #1
0
        /// <summary>
        /// Sets the reference to the DTO Base Class.
        /// </summary>
        /// <param name="entitiesDTOs">Entities DTOs to generate.</param>
        public void SetDTOBase(List <DTOEntity> entitiesDTOs)
        {
            if (string.IsNullOrWhiteSpace(this.NameBaseDTO) == false)
            {
                DTOEntity baseDTO = entitiesDTOs.FirstOrDefault(e => e.NameDTO == this.NameBaseDTO);

                this.BaseDTO = baseDTO;
            }
        }
Пример #2
0
        /// <summary>
        /// Gets the Properties of an EntityDTO to use in a Constructor as parameters, recursively including the Base Class properties.
        /// </summary>
        /// <param name="entityDTO">EntityDTO to get the Properties from.</param>
        /// <returns></returns>
        private static List<DTOClassProperty> GetPropertiesForConstructor(DTOEntity entityDTO)
        {
            LogManager.LogMethodStart();

            var result = new List<DTOClassProperty>();

            result.AddRange(entityDTO.Properties);

            if (entityDTO.BaseDTO != null)
            {
                result.AddRange(DTOGenerator.GetPropertiesForConstructor(entityDTO.BaseDTO));
            }

            LogManager.LogMethodEnd();

            return result;
        }
Пример #3
0
 public void SetNavigatesToDTOReference(DTOEntity dtoTarget)
 {
     this.NavigatesToDTO = dtoTarget;
 }
Пример #4
0
 public void SetNavigatesToDTOReference(DTOEntity dtoTarget)
 {
     this.NavigatesToDTO = dtoTarget;
 }