Very similar to how you would do if in SQL. I am assuming here that you have the id
column set as an identity column or something, so to correctly order it I will order it by the id
column, then get the top result:
db.TableName
.All()
.OrderByDescending(db.TableName.IdColumnName)
.First()
.IdColumnName