コード例 #1
0
        public Task CreateParticipentAsync(Guid contestId, CreateParticipentModel participent)
        {
            var participentEntity = new JsonTableEntity <ParticipentModel>(contestId.ToString(), participent.UserName, new ParticipentModel(contestId, participent.UserName, participent.PushInfo));
            var table             = this.StorageAccessService.GetTableReference(TableName);

            var operation = TableOperation.Insert(participentEntity);

            return(table.ExecuteAsync(operation));
        }
コード例 #2
0
        public async Task <ActionResult> CreateParticipent(Guid contestId, [FromBody] CreateParticipentModel participent)
        {
            await this.ContestRepository.CreateParticipentAsync(contestId, participent);

            return(Ok());
        }