I create a linq to sql in visual studio so i create a dbcontext object in my asp web form as you can see here :
public AccidentCongress.dblinqtoDb.dbDataContext dbcontext = new dbDataContext();
protected void BtnSend_Click1(object sender, EventArgs e)
{
if (dbcontext.tblUserInfos.??????)
}
I need to select a row in tblUserInfos
with where clause but the where clause doesn't in the list why ?
Make sure you have a using System.Linq;
statement towards the top of that file.
"Where" is an extension method which is declared in the System. Linq namespace, so make sure you add "using System.Linq;" to the using section at the top of the cs file.
添加对System.Linq
引用或没有using语句
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.