我想CustomerId
从我的表中返回前 1 名,如下所示:
string nxtCustId = db.ExecuteStoreQuery<string>("SELECT TOP 1 CustId FROM CustomerMaster WHERE Id >=(SELECT Max(Id) FROM CustomerDetail ) ORDER BY Id ").ToString();
但它返回System.Data.Objects.ObjectResult1[System.String]
我只想用ExecuteStoreQuery
OR来做ExecuteStoreCommand
。