/// <summary> /// Invoked when <see cref="ToEntity"/> operation is about to return. /// </summary> /// <param name="dto"><see cref="NotificationTypeDto"/> converted from <see cref="NotificationType"/>.</param> /// <param name="entity"><see cref="NotificationType"/> converted from <see cref="NotificationTypeDto"/>.</param> partial static void OnEntity(this NotificationTypeDto dto, NotificationType entity);
/// <summary> /// Converts this instance of <see cref="NotificationTypeDto"/> to an instance of <see cref="NotificationType"/>. /// </summary> /// <param name="dto"><see cref="NotificationTypeDto"/> to convert.</param> public static NotificationType ToEntity(this NotificationTypeDto dto) { if (dto == null) return null; var entity = new NotificationType(); entity.NotificationTypeId = dto.NotificationTypeId; entity.NotificationTypeName = dto.NotificationTypeName; entity.NotificationTypeDisplayName = dto.NotificationTypeDisplayName; entity.NotificationTypeIcon = dto.NotificationTypeIcon; dto.OnEntity(entity); return entity; }