private async Task <bool> Validations(ParamInsertSensorReading request) { if (!request.SensorReading.IsValid) { _notifications.AddRange(request.SensorReading.Notifications); return(false); } if (!await _deviceRepository.AnyAsync(request.SensorReading.DeviceId)) { _notifications.Add(new Notification("DeviceId", "It must be an existing device.")); return(false); } return(true); }