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

            var dto = new BadgeHistoryDTO();

            dto.ID               = entity.ID;
            dto.BadgeID          = entity.BadgeID;
            dto.Number           = entity.Number;
            dto.IsActive         = entity.IsActive;
            dto.ModifiedByUserID = entity.ModifiedByUserID;
            dto.ModifiedDate     = entity.ModifiedDate;
            dto.AuditDate        = entity.AuditDate;
            entity.OnDTO(dto);

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

            var entity = new BadgeHistory();

            entity.ID               = dto.ID;
            entity.BadgeID          = dto.BadgeID;
            entity.Number           = dto.Number;
            entity.IsActive         = dto.IsActive;
            entity.ModifiedByUserID = dto.ModifiedByUserID;
            entity.ModifiedDate     = dto.ModifiedDate;
            entity.AuditDate        = dto.AuditDate;
            dto.OnEntity(entity);

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