DataClasses1DataContext db = new DataClasses1DataContext(); var s = (from p in db.BusinessWaybill orderby p.id descending select p.id).First(); texts.Append(s..ToString());