可能重复:
在 linq 查询中使用字典
如何IN
使用 LINQ 发表声明?
是)我有的
var t = from i in emails
where i.Credencials_Id == agenciaid
select new
{
i.Alias,
i.Name,
i.Description,
i.Comentas,
i.DateHour,
i.Imovel_Id,
i.Email,
i.EmailCaptador
};
我想要什么(像这样)
var t = from i in emails
where i.Credencials_Id IN (agenciaid)
select new
{
i.Alias,
i.Name,
i.Description,
i.Comentas,
i.DateHour,
i.Imovel_Id,
i.Email,
i.EmailCaptador
};
int imovel = Convert.ToInt32(t.First().Imovel_Id);