Exemplo n.º 1
0
        private async Task <Copy> GetCopy(CopyId copyId, ReservationId reservationId)
        {
            var iterator = _container.GetItemLinqQueryable <CosmosDocument <Copy> >()
                           .Where(x => x.PartitionKey == this._partitionKey)
                           .Where(x => x.Data.CopyId == copyId && x.Data.OwnerId == reservationId)
                           .Take(1)
                           .ToFeedIterator();

            var copyDocument = await iterator.GetFirst();

            _modifiedDocuments.Add(copyDocument);

            return(copyDocument.Data);
        }
Exemplo n.º 2
0
 // equality by copy's id
 public bool Equals(HardCopy other)
 {
     return(CopyId.Equals(other.CopyId));
 }