|
|
@ -11,6 +11,8 @@ public class AbpNotificationsApplicationAutoMapperProfile : Profile |
|
|
.ForMember(dto => dto.Id, map => map.MapFrom(src => src.NotificationId.ToString())) |
|
|
.ForMember(dto => dto.Id, map => map.MapFrom(src => src.NotificationId.ToString())) |
|
|
.ForMember(dto => dto.Lifetime, map => map.Ignore()) |
|
|
.ForMember(dto => dto.Lifetime, map => map.Ignore()) |
|
|
.ForMember(dto => dto.Data, map => map.MapFrom((src, nfi) => |
|
|
.ForMember(dto => dto.Data, map => map.MapFrom((src, nfi) => |
|
|
|
|
|
{ |
|
|
|
|
|
if (src != null) |
|
|
{ |
|
|
{ |
|
|
var dataType = Type.GetType(src.NotificationTypeName); |
|
|
var dataType = Type.GetType(src.NotificationTypeName); |
|
|
var data = Activator.CreateInstance(dataType); |
|
|
var data = Activator.CreateInstance(dataType); |
|
|
@ -19,6 +21,7 @@ public class AbpNotificationsApplicationAutoMapperProfile : Profile |
|
|
notificationData.ExtraProperties = src.ExtraProperties; |
|
|
notificationData.ExtraProperties = src.ExtraProperties; |
|
|
return notificationData; |
|
|
return notificationData; |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
return new NotificationData(); |
|
|
return new NotificationData(); |
|
|
})); |
|
|
})); |
|
|
} |
|
|
} |
|
|
|