//
 // GET: /Stats/
 public ActionResult Index()
 {
     StatsViewModel model = new StatsViewModel(User.Identity.GetUserId());
     if (model.entries.Count > 0)
         return View(model);
     else
         return View("NoEntries");
 }
 public object GetMostExpensivePurchase()
 {
     StatsViewModel model = new StatsViewModel(User.Identity.GetUserId());
     return (from entry in model.MostExpensivePurchases
                 select new {
                     Name = entry.EntryName,
                     Sum = entry.EntrySum,
                     Date = entry.EntryDate,
                     Description = entry.EntryDescription
                 }).First();
 }