コード例 #1
0
        public async Task Post([FromBody] GraphQuery value, [FromQuery] string collectionId)
        {
            if (string.IsNullOrEmpty(value.Id))
            {
                value.Id = Guid.NewGuid().ToString();
            }

            var queries = await queryRepo.GetItemAsync(collectionId);

            if (queries == null)
            {
                queries = new List <GraphQuery>();
            }

            queries.Add(value);

            await queryRepo.CreateOrUpdateItemAsync(queries, collectionId);
        }
コード例 #2
0
 public async Task Post([FromBody] GraphSettings value, [FromUri] string collectionId)
 {
     await settingsRepo.CreateOrUpdateItemAsync(value, collectionId);
 }