This is what I have so far:
var TEST = await context.ProcessRevision.FirstOrDefaultAsync(i => i.ProcessRevId == (context.ProcessRevision.Max(i => i.ProcessRevId)));
I am unsure whether this is a good solution or if I could do something a little more elegant with less processing.
Just sort it in descending order and get the first entity. Most likely this is EF context? So it should be translated into a
select top (1) with
order by ... desc.
var test = await context.ProcessRevision.OrderByDescending(r => r.ProcessRevId).FirstOrDefaultAsync();