This application has two tables: Students and Occurrences. To show the occurrences I can calmly ... But now I have a new business rule: Show the occurrences by date. So basically it would be the following, I would have to show the most current occurrences according to the date, that is, if for example I generated an instance yesterday, then it will show it in evidence above the others, but if I generate one today, this of today will have to be in evidence. As for example, what happens here in SOpt. How could I use native C # formatting to show date and time / minutes. That is, I wanted to be able to show beyond the date, the hour and the minute, because I need these data for what at the time of listing.
And how could I do this listing by putting the current ones in the user's view, that is, in evidence?
Here I will show you what the search I do in the bank to show the occurrences is:
The ActionResult that scans the table and shows the data (That for now, I show the names, but I want to show the names and dates, as described above):
public ActionResult Inicio()
{
List<Ocorrencia> resultado = db.Ocorrencias.Include(o => o.Aluno).ToList();
return View(resultado);
}
So basically I just look for the names, and with that the new occurrences are getting underneath the old ones, and that's not what I need. I need the new ones, listed by date, to stay up, in evidence .... But how do I do that?