public static string ToStr(INotificationParams data) { if (data == null) { return(null); } return(JsonConvert.SerializeObject(data)); }
public long?Add(string entityId, EntityType entityType, string message, INotificationParams additionalParams, string tag, NotificationType type, DateTime?createDate = null) { var inputParams = JsonConvert.SerializeObject(additionalParams); return(Add(new NotificationDTO() { Type = (int)type, RelatedEntityId = entityId, RelatedEntityType = (int)entityType, Message = message, AdditionalParams = inputParams, Tag = tag, CreateDate = createDate })); }