示例#1
0
        public async Task <IGroupResource> AddAsync(IGroupResource resource)
        {
            var entity = GroupResourceEntity.Create(resource);
            await _tableStorage.InsertOrMergeAsync(entity);

            return(entity);
        }
示例#2
0
 public Task DeleteAsync(string name)
 {
     return(_tableStorage.DeleteIfExistAsync(GroupResourceEntity.GeneratePartitionKey(name), GroupResourceEntity.GenerateRowKey(name)));
 }
示例#3
0
 public async Task <IGroupResource> GetAsync(string name)
 {
     return(await _tableStorage.GetDataAsync(GroupResourceEntity.GeneratePartitionKey(name), GroupResourceEntity.GenerateRowKey(name)));
 }