我一直在玩Linq to Sql,我想知道是否有可能得到一个结果?例如,我有以下内容:
using(DataClassContext context = new DataClassContext()) { var customer = from c in context.table where c.ID = textboxvalue select c; }
有了这个,我需要围绕var客户做一个foreach,但我知道这将是一个单一的值!任何人都知道我该怎么做 textbox.text = c.name; 或者类似的东西?
textbox.text = c.name;