EtagItem
A base helper class that implements IItemWithEtag
Namespace: Microsoft.Azure.CosmosRepository
Kind: class
A base helper class that implements IItemWithEtag
public abstract class EtagItem : Item, IItemWithEtag, IItemExample
Here is an example subclass item, which adds several properties:
public class SubItem : EtagItem{ public DateTimeOffset Date { get; set; } public string Name { get; set; } public IEnumerable<Child> Children { get; set; } public IEnumerable<string> Tags { get; set; }}
public class Child{ public string Name { get; set; } public DateTime BirthDate { get; set; }}Members
Constructors
EtagItem.EtagItem()
Default constructor
protected EtagItem()EtagItem.EtagItem(string)
A constructor that allows the etag to be set so that items can be mapped to and from other objects
protected EtagItem(string etag)Parameters
| Name | Type | Description |
|---|---|---|
etag | String | — |
Property
EtagItem.Etag
Etag for the item which was set by Cosmos the last time the item was updated. This string is used for the relevant operations when specified.
[JsonProperty("_etag")]public string Etag { get; }Returns — String