public async Task <IActionResult> Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "GetAlarmById/{id}")] HttpRequest req, ILogger log, int id) { Alarm alarm = _alarmService.GetAlarmById(id); return(new OkObjectResult(alarm)); }
private AlarmWatch ParseFunctionModelToDtoModel(SubscribeToAlarmModel stam) { AlarmSystem.Core.Entity.DB.Alarm alarm = _alarmservice.GetAlarmById(stam.AlarmId); AlarmWatch aw = new AlarmWatch() { Alarm = alarm, WatchId = stam.WatchId }; return(aw); }