Exemple #1
0
        public async Task <List> Upsert(List list)
        {
            var group = await groupClient.GetItem(Group.EntityPartitionKey, list.GroupId);

            var upsertedList = await client.UpsertItem(list);

            if (!group.ListIdExists(list.Id))
            {
                group.AddListId(list.Id);
                await groupClient.UpsertItem(group);
            }

            return(upsertedList);
        }
Exemple #2
0
 public Task <User> Upsert(User user)
 {
     logger.LogDebug($"Upserting: {JsonSerializer.Serialize(user)}");
     return(client.UpsertItem(user));
 }
Exemple #3
0
        public async Task <Group> Upsert(Group group)
        {
            var createdGroup = await repository.UpsertItem(group);

            return(createdGroup);
        }