3
I have a LINQ query that lists the current month’s birthday:
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 put it together, the intention was to bring the birthday boy of the day as the first record, and in the second the current birthday boy. The query is returning the records but the birthday of the day does not come first...
When the list is assembled the order is not maintained... how to make it maintain the order I put in the Union?
Just get the order out of the
Union
– Jéf Bueno