Exemplo n.º 1
0
        public async Task <TableStorageResponse <DeviceRule> > DeleteDeviceRuleAsync(string deviceId, string ruleId)
        {
            DeviceRule found = await _deviceRulesRepository.GetDeviceRuleAsync(deviceId, ruleId);

            if (found == null)
            {
                var response = new TableStorageResponse <DeviceRule>();
                response.Entity = found;
                response.Status = TableStorageResponseStatus.NotFound;

                return(response);
            }

            return(await _deviceRulesRepository.DeleteDeviceRuleAsync(found));
        }