public async Task AddOwner(OwnershipRegistration registration, OwnershipOwner owner) { CloudTableClient client = _account.CreateCloudTableClient(); CloudTable table = client.GetTableReference(OwnershipTableName); TableOperation operation = TableOperation.InsertOrReplace(new TypedEntity(registration.GetKey(), owner.GetKey(), OwnerType)); await table.ExecuteAsync(operation); }
public async Task AddVersion(OwnershipRegistration registration, OwnershipOwner owner, string version) { CloudTableClient client = _account.CreateCloudTableClient(); CloudTable table = client.GetTableReference(OwnershipTableName); TableBatchOperation batch = new TableBatchOperation(); batch.InsertOrReplace(new TypedEntity(registration.GetKey(), owner.GetKey(), OwnerType)); batch.InsertOrReplace(new TypedEntity(registration.GetKey(), version, PackageType)); await table.ExecuteBatchAsync(batch); }
public Task <bool> HasOwner(OwnershipRegistration registration, OwnershipOwner owner) { return(ExistsAsync(_account, registration.GetKey(), owner.GetKey())); }
public Task<bool> HasOwner(OwnershipRegistration registration, OwnershipOwner owner) { return ExistsAsync(_account, registration.GetKey(), owner.GetKey()); }