Below i have a snippet of code which outputs a list of Appointments based on clients, some clients can have more than one appointment but the latest one is the one that needs to be outputted for said client

the output is not grouping at all and for some reason i cannot figure why the heck not

```
foreach (ClientRecord client in clients)
                {
                    List<ReturnRecord> records = db.Appointments
                        .AsNoTracking()
                        .Include(rec => rec.Property)
                        .Include(rec => rec.Property.Address)
                        .Include(rec => rec.AppointmentType)
                        .ToList()
                        .Where(rec => rec.ClientID == client.ID)
                        .Select(rec => new ReturnRecord
                        {
                            ClientName = $"{client.FirstNames} {client.Surnames}",
                            PropertyAddress = $"{rec.Property.Address.FormattedAddress}",
                            AppStatus = $"{rec.AppointmentStatus.Name}",
                            StockStatus = $"{rec.Property.Stocks.FirstOrDefault().StockStatus.Name}",
                            LastUpdated = rec.LastUpdated

                        })
                        .ToList();

                    returnList.AddRange(records);

                }
                returnList.GroupBy(rec => rec.PropertyAddress);

                return Ok(returnList);

```

here is an attachment of the screen grab of the output
[![enter image description here](https://i.stack.imgur.com/yk1Cg.png)](https://i.stack.imgur.com/yk1Cg.png)