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

            entity.ETag = "*";
            var result = await processor.DeleteFromTable("Grouping", 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] GroupingEntity data)
        {
            if (data.DisplayId == Guid.Empty)
            {
                data.DisplayId = Guid.NewGuid();
            }
            var processor = GetAzureProcessor();
            var ret       = await processor.CreateTable("Grouping");

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