private Int64 SaveNotification(string ReceiverAppId, int to, string message, DateTime messageTime, String extraDataAsJson) { RealTimeNotifications obj = new RealTimeNotifications(); obj.NotificationID = 0; obj.receiverAppID = ReceiverAppId; obj.SenderID = 0; obj.ReceiverID = to; obj.NotificationDetail = message; obj.IsRead = false; obj.CreatedOn = messageTime; obj.extraDataAsJson = extraDataAsJson; var result = NotificationEngineDataService.SaveNotification(obj); return(result); }
private long SaveNotification(CustomConnectionData src, CustomConnectionData target, String message, DateTime messageTime, String extraDataAsJson, out String uniqueNotificationID) { uniqueNotificationID = Guid.NewGuid().ToString(); RealTimeNotifications obj = new RealTimeNotifications(); obj.NotificationID = uniqueNotificationID; obj.SenderAppID = src.AppID; obj.SenderID = src.UserID; obj.ReceiverAppID = target.AppID; obj.ReceiverID = target.UserID; obj.NotificationDetail = message; obj.IsRead = false; obj.CreatedOn = messageTime; obj.extraDataAsJson = extraDataAsJson; var result = NotificationEngineDataService.SaveNotification(obj); return(result); }