azure-cosmos-dotnet-repository icon indicating copy to clipboard operation
azure-cosmos-dotnet-repository copied to clipboard

`ArchivableEventItem` - Allows events to be archived

Open mumby0168 opened this issue 2 years ago • 0 comments

It might be the case that events might need to be archived and then removed after a period of time.

public class ArchivableEventItem : EventItem
{
     public bool IsArchived { get; set; }
}

This can use the time to live property to mark the event for deletion after a period of time.

There could then be a new method on the IEventStore<TEventItem> something like _eventStore.ArchiveAsync("partitionKeyValue", x => x.Id == "A")

mumby0168 avatar Mar 18 '22 11:03 mumby0168