public Tuple<List<User>, List<Message>> List()
 {
     using (var context = new GuestbookContext())
     {
         var users = context.Users.ToList();
         var messages = context.Messages.ToList();
         return new Tuple<List<User>, List<Message>>(users, messages);
     }
 }
 public void AddEntry(string user, string message)
 {
     using (var context = new GuestbookContext())
     {
         var existinguser = context.Users.FirstOrDefault(u => u.Name == user);
         if (existinguser == null)
         {
             existinguser = new User
             {
                 Name = user
             };
             context.Users.Add(existinguser);
             context.SaveChanges();
         }
         context.Messages.Add(new Message {Date = DateTime.Now, Text = message, UserID = existinguser.ID});
         context.SaveChanges();
     }
 }