This is a simple concept but the LINQ/SQL solution has me stumped!

In the example data below, for each ID I need to retrieve one `ISRC`, taking the earliest dated one for each.

The data is sorted by `ID/ReleaseDate/ISRC`, so I could read the first/top record for each ID.
ie ID 1 = **GBMNA1600001**, ID 2 = **GBMNA1600002**, ID 3 = **GBMNA1600003**, ID 20 = **GBMNA1680058**...

```
ID  ProductID   ISRC    ReleaseDate
1   16  GBMNA1600001    2016-03-27 00:00:00.0000000
1   26  GBMNA1680038    2016-04-24 00:00:00.0000000
1   32  GBMNA1680057    2016-05-01 00:00:00.0000000
1   132 GBMNA1680482    2016-11-13 00:00:00.0000000
1   223 GBMNA1781107    2017-03-26 00:00:00.0000000
2   5   GBMNA1600002    2016-02-14 00:00:00.0000000
2   32  GBMNA1680049    2016-05-01 00:00:00.0000000
3   13  GBMNA1600003    2016-03-13 00:00:00.0000000
3   38  GBMNA1680095    2016-05-29 00:00:00.0000000
3   485 GBMNA1880099    2018-06-26 00:00:00.0000000
20  32  GBMNA1680058    2016-05-01 00:00:00.0000000
20  39  GBMNA1680084    2016-05-29 00:00:00.0000000
20  116 GBMNA1680399    2016-10-30 00:00:00.0000000
20  281 GBMNA1780886    2017-06-05 00:00:00.0000000
20  360 GBMNA1600028    2018-01-08 00:00:00.0000000

```

But I don't know where to start with the LINQ syntax, or even figure out the SQL it should create.

I'm using ASP.NET Core 2.0 with EF, code is C# and db is SQL server 2016.

It's in a table I reference using a dbcontext, so I'm starting with

```
var earliestISRCS = from i in _context.allISRCS
                    select i;

```

I've tried using `MIN()` for the date, or sorting the data and using `.FirstOrDefault()` or `Take(1)` but only manage to get one record back.

What I need is to return a set of data - the earliest `ISRC` per `ID`.

If there happens to be more than one `ISRC` for the same date then the sort order of `ISRCS` will additionally be used to determine the first one.