public static NotificationEntity ToDataModel(this Core.Notification.Notification notification) { NotificationEntity retVal = new NotificationEntity(); retVal.InjectFrom(notification); retVal.SendingGateway = notification.NotificationSendingGateway.GetType().Name; return(retVal); }
public static NotificationEntity ToDataModel(this Core.Notifications.Notification notification) { var retVal = new NotificationEntity(); retVal.InjectFrom(notification); retVal.SendingGateway = notification.NotificationSendingGateway.GetType().Name; if (notification is EmailNotification emailNotification) { retVal.Сс = !emailNotification.CC.IsNullOrEmpty() ? string.Join(",", emailNotification.CC) : null; retVal.Bcс = !emailNotification.Bcc.IsNullOrEmpty() ? string.Join(",", emailNotification.Bcc) : null; } return(retVal); }