title: How can I get data which equals a specific user in my MVC?
body: <p>I am trying to show different information from the database on my website depending on which user is logged in. I have just begun with MVC (have done a couple of tutorials and can see information through my views on webpage.) Now I want to filter data on the user who is logged in. I am thinking a where clause somewhere. I am thinking in this controller where the context gets the data from db. </p>
  
  <p>But how? Or is this the wrong place? Please tell me if you need some more info.. </p>
  
  <p>I am trying with 
      <code>db.Contacts.ToList().Where()</code>, but I don´t get access to UserName here..</p>
  
  <pre><code>private ApplicationDbContext db = new ApplicationDbContext();
  
  // GET: 
  public ActionResult Index()
  {
      return View(db.Contacts.ToList());
  }
  </code></pre>