title: How can I find a object from dbcontext with string parameter, not with Find(primary key) function
body: <p>Yes, context.Accounts.Find(id) where id is primary key, it does bring me the right account.
  But I want to search from context.Accounts with string username, not by primary key.</p>
  
  <p>To be more precise, method:</p>
  
  <pre><code>public void Authenticate(string username, password)
  {       result = false;
          Accounts test = new Accounts();
          test.User = username;
          Accounts dbEntry = new Accounts();
          dbEntry = context.Accounts_.Find(test.User);
  
          if (dbEntry.Password == password)
              if(dbEntry.Admin == 1)
                result = true;
          return result;
      }
  </code></pre>
  
  <p>So username is not primary key anymore, how i can find the right one without Find() function?</p>