示例#1
0
        public async Task StartContestAsync(Guid contestId)
        {
            var entity = await StorageAccessService.GetTableEntityAsync <JsonTableEntity <BeerContestModel> >(TableName, contestId.ToString(), contestId.ToString());

            entity.Entity.State = BeerContestState.InProgress;

            var            table     = StorageAccessService.GetTableReference(TableName);
            TableOperation operation = TableOperation.Replace(entity);
            await table.ExecuteAsync(operation);
        }
示例#2
0
        public async Task <JsonTableEntity <BeerContestModel> > GetContestDefinitionEntityAsync(Guid contestId)
        {
            var entity = await StorageAccessService.GetTableEntityAsync <JsonTableEntity <BeerContestModel> >(TableName, contestId.ToString(), contestId.ToString());

            return(entity);
        }