I do not know if the title was good, but the question is:
listaAgendaDetalhe = (from a in listaAgenda
join p in listaProfissional
on a.idProfissional equals p.id
select new agendaDetalhe()
{
ativo = p.ativo,
dataIni = a.dataIni,
especialidade = a.especialidade,
if (a.frequencia = 0)
frequencia = 'DIARIO'
else if (a.frequencia = 1)
frequencia = 'SEMANAL'
else if (a.frequencia = 2)
frequencia = 'QUINZENAL'
}).ToList();
The question is in the frequencia
field, I want to do a check before assigning a value to it, but the way I did, it does not work.