public IActionResult GetReadingData() { List <ReadingDataVM> model = new List <ReadingDataVM>(); _readingService.GetAllReadings().ToList().ForEach(u => { ReadingDataVM readingData = new ReadingDataVM { BuildingId = u.BuildingId, ObjectId = u.ObjectId, DataFieldId = u.DataFieldId, Value = u.Value, Timestamp = u.Timestamp }; model.Add(readingData); }); return(Ok(model)); }