【发布时间】:2010-04-16 15:53:14
【问题描述】:
大家好,Linq-to-SQL 有问题,我基本上是在执行以下操作,但在我写“u.Username”的当前上下文中它是“UserProfile 不包含用户名的定义”,但是它确实存在我已将 UserProfile 表添加到 MyDbml.dbml,如果我连接到另一个表,它工作正常。
TiamoDataContext context = new TiamoDataContext();
var user = (from u in context.UserProfiles
where u.Username == UsernameLabel
select u).FirstOrDefault();
我为让它发挥作用而错过了多少小细节而感到慌乱,任何人有任何线索都会非常感激。
【问题讨论】:
-
请贴出UserProfile的内容
标签: c# asp.net sql sql-server linq