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

            var dto = new NotificationTypeDto();

            dto.NotificationTypeId          = entity.NotificationTypeId;
            dto.NotificationTypeName        = entity.NotificationTypeName;
            dto.NotificationTypeDisplayName = entity.NotificationTypeDisplayName;
            dto.NotificationTypeIcon        = entity.NotificationTypeIcon;

            entity.OnDto(dto);

            return(dto);
        }