//[BsonConstructor]
 public Notification(string userName, INotifiable notificationType, IMongoDocument attachment)
 {
     Id                 = ObjectId.GenerateNewId().ToString();
     UserName           = userName;
     Resolved           = false;
     ForUserType        = notificationType.ForUserType;
     NotificationType   = notificationType.GetType().FullName; //.ToString();
     Attachment         = attachment;
     AttachmentIdString = attachment.Id;
     AttachmentType     = attachment.GetType().Name;
     DateGenerated      = DateTime.Now;
 }
Пример #2
0
 //Delete
 public SafeModeResult DeleteDocument <T>(IMongoDocument document)
 {
     return(GetCollection <T>().Remove(Query.EQ("_id", document._id)));
 }