If you just want a single row to be returned then you can simply use the LINQ
.Single()
or
.First()
extension method:
var query = (from c in db.Tbl_Model
join o in db.Tbl_ModelImg
on c.Model_Id equals o.Model_Id
join d in db.Tbl_SubCategory on c.SubCategory_Id equals d.Id
where c.SubCategory_Id == sId
select new showdata()
{
tm = c,
tmi = o,
tblsubcategory = d
}).OrderByDescending(d => d.tm.Id);
var details = query.ToList();
var commonImage = query.First();
Note that the
.ToList()
method will return all the rows based from your query.