/// <summary>
        /// Converts this instance of <see cref="BadgeTypeBadge"/> to an instance of <see cref="BadgeTypeBadgeDTO"/>.
        /// </summary>
        /// <param name="entity"><see cref="BadgeTypeBadge"/> to convert.</param>
        public static BadgeTypeBadgeDTO ToDTO(this BadgeTypeBadge entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new BadgeTypeBadgeDTO();

            dto.BadgeTypeID      = entity.BadgeTypeID;
            dto.BadgeID          = entity.BadgeID;
            dto.CreatedByUserID  = entity.CreatedByUserID;
            dto.CreatedDate      = entity.CreatedDate;
            dto.ModifiedByUserID = entity.ModifiedByUserID;
            dto.ModifiedDate     = entity.ModifiedDate;
            entity.OnDTO(dto);

            return(dto);
        }
        /// <summary>
        /// Converts this instance of <see cref="BadgeTypeBadgeDTO"/> to an instance of <see cref="BadgeTypeBadge"/>.
        /// </summary>
        /// <param name="dto"><see cref="BadgeTypeBadgeDTO"/> to convert.</param>
        public static BadgeTypeBadge ToEntity(this BadgeTypeBadgeDTO dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new BadgeTypeBadge();

            entity.BadgeTypeID      = dto.BadgeTypeID;
            entity.BadgeID          = dto.BadgeID;
            entity.CreatedByUserID  = dto.CreatedByUserID;
            entity.CreatedDate      = dto.CreatedDate;
            entity.ModifiedByUserID = dto.ModifiedByUserID;
            entity.ModifiedDate     = dto.ModifiedDate;
            dto.OnEntity(entity);

            return(entity);
        }
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="BadgeTypeBadge"/> converted from <see cref="BadgeTypeBadgeDTO"/>.</param>
 static partial void OnEntity(this BadgeTypeBadgeDTO dto, BadgeTypeBadge entity);
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="BadgeTypeBadgeDTO"/> converted from <see cref="BadgeTypeBadge"/>.</param>
 static partial void OnDTO(this BadgeTypeBadge entity, BadgeTypeBadgeDTO dto);