这是我的代码:
var query = from row1 in table.AsEnumerable()
let time = row1.Field<DateTime>("time")
let uri = row1.Field<string>("cs-uri-stem")
let ip = row1.Field<string>("c-ip")
let questionid = row1.Field<int>("questionid")
where questionid == int.Parse(table.Rows[x]["questionid"].ToString())
select new
{
time,
uri,
ip,
questionid
};
ip列应该是唯一的。我不能在 ip 字段中有重复的项目。是否可以在 linq 中执行此操作