/// <summary> /// Store or update scrum entity in table storage. /// </summary> /// <param name="entity">entity.</param> /// <returns><see cref="Task"/> that represents configuration entity is saved or updated.</returns> private async Task <TableResult> StoreOrUpdateScrumEntityAsync(ScrumEntity entity) { await this.EnsureInitializedAsync(); TableOperation addOrUpdateOperation = TableOperation.InsertOrReplace(entity); return(await this.scrumCloudTable.ExecuteAsync(addOrUpdateOperation)); }
/// <summary> /// Store or update scrum entity in table storage. /// </summary> /// <param name="scrum">scrumEntity.</param> /// <returns><see cref="Task"/> that represents configuration entity is saved or updated.</returns> public async Task <bool> SaveOrUpdateScrumAsync(ScrumEntity scrum) { try { scrum.PartitionKey = PartitionKey; scrum.RowKey = scrum.ThreadConversationId; var result = await this.StoreOrUpdateScrumEntityAsync(scrum); return(result.HttpStatusCode == (int)HttpStatusCode.NoContent); } catch (Exception ex) { this.telemetryClient.TrackException(ex); this.telemetryClient.TrackTrace($"Exception : {ex.Message}"); return(false); } }