Good morning!
I would like to know how to sort two columns at a time in a query so that it is, in my case, 1st in descending order of date but in alphabetical order.
public IList<Analise> ListaTodosOrdenado()
{
using (ISession _session = FHibernateHelper.AbreSession())
{
var analises = _session.QueryOver<Analise>()
.JoinQueryOver(p => p.MateriaPrima)
.TransformUsing(Transformers.DistinctRootEntity)
.List();
var a = analises.OrderByDescending(d => d.DataCadastro).OrderBy(n=>n.MateriaPrima.Nome);
return (analises);
}
}
In these lines of code, the 1st order by date, but the second ordering overlaps the 1st.