public void StoreNotification(MessageNotificationModel msg, int userid) { using (var db = DatabaseFactory.OpenDbConnection()) { var dbNotif = new Model.ORM.Notification <MessageNotificationModel>() { Id = msg.Guid, UserId = userid, IsRead = false, NotificationObject = msg, Timestamp = msg.Timestamp, Type = Model.NotificationTypeEnum.message }; db.Insert <Model.ORM.Notification <MessageNotificationModel> >(dbNotif); } }
private void StoreNotification(TopicNotificationModel nt, int userid) { using (var db = DatabaseFactory.OpenDbConnection()) { var dbNotif = new Model.ORM.Notification <TopicNotificationModel>() { Id = nt.Guid, UserId = userid, IsRead = false, NotificationObject = nt, Timestamp = nt.Timestamp, Type = nt.NotificationType }; db.Insert <Model.ORM.Notification <TopicNotificationModel> >(dbNotif); } }