private UserNotificationDTO ToDTO(UserNotification x) { return(new UserNotificationDTO { Id = x.Id, Name = x.Name, NotificationMessage = x.NotificationMessage, NotificationType = x.NotificationType, Created = x.Created, RelatedEntityType = x.GetRelatedEntityType(), RelatedEntityId = x.GetRelatedEntityId() }); }