请教高手 linq to sql 如何写 select top1 id 的方法

2024-12-18 01:04:03
推荐回答(1个)
回答1:

DataClasses1DataContext db = new DataClasses1DataContext();

var s = (from p in db.BusinessWaybill orderby p.id descending

select p.id).First();

texts.Append(s..ToString());