hi i have the following code:
但是我收到了一个错误 'newwcf.Client'不包含'Where'的定义 请帮忙..
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.Data;
namespace newwcf
{
public class myservice : Imyservice
{
public List<ClientDetails> getClient()
{
List<ClientDetails> client = new List<ClientDetails>();
var sql = Client.Where(cn => cn.ClientName).ToList(); //getting the error here
return sql;
}
}
}
答案 0 :(得分:2)
c#是区分大小写的...你应该尝试
var sql = client.Where(cn => cn.ClientName).ToList();