Beispiel #1
0
        public async Task <int> Delete([FromUri] string grouping, [FromUri] string name)
        {
            var           processor = GetAzureProcessor();
            SettingEntity entity    = new SettingEntity(name, grouping);

            entity.ETag = "*";
            var result = await processor.DeleteFromTable("Setting", entity);

            return(result);
        }
Beispiel #2
0
        //public async void Post([FromBody]string name, [FromBody]string grouping, [FromBody]string color, [FromBody]string longName)
        public async Task <int> Post([FromBody] SettingEntity data)
        {
            if (data.DisplayId == Guid.Empty)
            {
                data.DisplayId = Guid.NewGuid();
            }
            var processor = GetAzureProcessor();
            var ret       = await processor.CreateTable("Setting");

            return(await processor.AddToTable("Setting", data));
        }