Ejemplo n.º 1
0
        public async Task <int> Delete([FromUri] string grouping, [FromUri] string name)
        {
            var processor           = GetAzureProcessor();
            DataCenterEntity entity = new DataCenterEntity(name, grouping);

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

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

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