Example #1
0
        /// <summary>
        /// Converts this instance of <see cref="files"/> to an instance of <see cref="filesDTO"/>.
        /// </summary>
        /// <param name="entity"><see cref="files"/> to convert.</param>
        public static filesDTO ToDTO(this files entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new filesDTO();

            dto.id_file     = entity.id_file;
            dto.name_file   = entity.name_file;
            dto.adjunt_date = entity.adjunt_date;
            dto.status      = entity.status;
            dto.type        = entity.type;
            dto.modify_date = entity.modify_date;
            dto.address     = entity.address;

            entity.OnDTO(dto);

            return(dto);
        }
Example #2
0
        /// <summary>
        /// Converts this instance of <see cref="filesDTO"/> to an instance of <see cref="files"/>.
        /// </summary>
        /// <param name="dto"><see cref="filesDTO"/> to convert.</param>
        public static files ToEntity(this filesDTO dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new files();

            entity.id_file     = dto.id_file;
            entity.name_file   = dto.name_file;
            entity.adjunt_date = dto.adjunt_date;
            entity.status      = dto.status;
            entity.type        = dto.type;
            entity.modify_date = dto.modify_date;
            entity.address     = dto.address;

            dto.OnEntity(entity);

            return(entity);
        }
Example #3
0
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="files"/> converted from <see cref="filesDTO"/>.</param>
 static partial void OnEntity(this filesDTO dto, files entity);
Example #4
0
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="filesDTO"/> converted from <see cref="files"/>.</param>
 static partial void OnDTO(this files entity, filesDTO dto);