119
|
1 using System.Linq;
|
|
2 using System.Web.Mvc;
|
|
3 using AltNetHispano.Agendas.Factories;
|
|
4 using AltNetHispano.Agendas.Web.Models;
|
|
5
|
|
6 namespace AltNetHispano.Agendas.Web.Controllers
|
|
7 {
|
|
8 public class HistoricoController : Controller
|
|
9 {
|
|
10 public ActionResult Index()
|
|
11 {
|
|
12 var agenda = AgendaFactory.GetAgenda();
|
|
13
|
|
14 var model = new HistoricoIndexModel
|
|
15 {
|
|
16 Items = from e in agenda.GetHistorico()
|
|
17 orderby e.Fecha
|
|
18 select new HistoricoDto
|
|
19 {
|
|
20 Id = e.Id.ToString(),
|
|
21 Titulo = e.Titulo,
|
|
22 Fecha = e.Fecha.HasValue ? e.Fecha.Value.ToShortDateString() : string.Empty,
|
|
23 Wiki = e.UrlWiki,
|
|
24 Ponente = e.Ponente.Nombre
|
|
25 }
|
|
26 };
|
|
27 return View(model);
|
|
28 }
|
|
29 }
|
|
30 } |