I have a LINQ query that lists the birthdays of the current month:
Ramal[] RamalAniver = (from a in db.Ramais
where a.sAniversario.Contains(DiaAniversario + "/" + MesAniversario) && a.bAtivo == true
select a)
.Union(
from c in db.Ramais
where c.sAniversario.Contains("/" + MesAniversario) && c.bAtivo == true
orderby c.sAniversario
select c
).ToArray();
But when I set it up, the intention was in the first consultation to bring the birthday boy for the day as the first record, and on the second anniversary of the current month. The query is returning the records but the birthday party of the day does not come first ...
When the list is assembled the order is not maintained ... how do I keep it in the order I put in the Union?