public IEnumerable <Link> Link(int taskId) { var prev = DB.Tasks.Where(x => x.Id < taskId).Select(x => x.Id).DefaultIfEmpty().Max(); var next = DB.Tasks.Where(x => x.Id > taskId).Select(x => x.Id).DefaultIfEmpty().Min(); if (prev > 0) { yield return(Links.Link <TaskPaper>(prev).SetTitle("Anterior")); } if (next > 0) { yield return(Links.Link <TaskPaper>(next).SetTitle("Próximo")); } }
public IEnumerable <Link> Link(Task task) { yield return(Links.Link($"http://www.google.com?q={task.Name}").SetTitle("Google Search")); }
public IEnumerable <Link> Link() { yield return(Links.Link <TasksPaper>().SetTitle("Tarefas")); }
public IEnumerable <IFormatter> Format(Task[] tasks) { yield return(Links.Link("http://www.google.com").SetTitle("Google Search")); yield return(Tables.MakeTable(tasks)); }