public async Task <IActionResult> GetRecords(DateTime date) { if (ModelState.IsValid) { var groupid = _configuration.GetValue <int>("GroupId"); var people = await _dbHandler.GetPeopleFromGroupByDate(groupid, date); var guests = await _dbHandler.GetGuestsForDate(date); var result = new { People = people, GuestCount = guests }; return(Ok(result)); } return(BadRequest()); }