// GET api/guestbookentry public IEnumerable <GuestbookEntry> Get() { var mostRecentEntries = _repository.GetMostRecentEntries(); return(mostRecentEntries); }
public ActionResult Index() { //ViewBag.Entries = _repository.GetMostRecentEntries(); // passa il risultato della query alla view int i = 5; return(View(_repository.GetMostRecentEntries())); }