Ejemplo n.º 1
0
        /// <summary>
        /// Invoked when <see cref="ToDTO"/> operation is about to return.
        /// </summary>
        /// <param name="dto"><see cref="TaskJobMapDTO"/> converted from <see cref="TaskJobMap"/>.</param>
partial         static void OnDTO(this TaskJobMap entity, TaskJobMapDTO dto);
Ejemplo n.º 2
0
        /// <summary>
        /// Converts this instance of <see cref="TaskJobMap"/> to an instance of <see cref="TaskJobMapDTO"/>.
        /// </summary>
        /// <param name="entity"><see cref="TaskJobMap"/> to convert.</param>
        public static TaskJobMapDTO ToDTO(this TaskJobMap entity)
        {
            if (entity == null) return null;

            var dto = new TaskJobMapDTO();

            dto.MapId = entity.MapId;
            dto.TaskId = entity.TaskId;
            dto.JobId = entity.JobId;

            entity.OnDTO(dto);

            return dto;
        }