As I pass in the where of this linq to max datatransaction, ie, I want to bring the result but for the greater date.
var resultado = (from ci in webDB.T_Controle_Importacao
where ci.CNPJ == cnpj
let dd = EntityFunctions.DiffDays(DateTime.Now, ci.DataTransacao)
select dd >= 45 ? 3
: dd >= 15 ? 2
: 1).Take(1);