Example #1
0
        public void Delete(string aggregateId, string bucketId, DateTime deleteDateTime, object data = null)
        {
            IDictionary <string, object> dictionary = null;

            if (data != null)
            {
                dictionary = data.GetType().GetProperties().ToDictionary(p => p.Name, p => p.GetValue(data));
            }

            var id = new SlotId(aggregateId, bucketId);

            _collection.Save(new RecycleBinSlot(id, deleteDateTime, dictionary), id);
        }
Example #2
0
 public void Purge(SlotId id)
 {
     _collection.RemoveById(id);
 }
Example #3
0
 public RecycleBinSlot(SlotId id, DateTime deleteDateTime, IDictionary <string, object> data)
 {
     Id             = id;
     this.Data      = data;
     this.DeletedAt = deleteDateTime;
 }
Example #4
0
 public void Purge(SlotId id)
 {
     _collection.Remove(Query.EQ("_id", id.ToBsonDocument()));
 }