title: query entity with linq passing in two parameters
body: <p>I had an ineffective way of returning a particular entity held in my table by using the following code:</p>
  
  <pre><code>     private static EntityModel.Name GetNameEntity(EntityModel.MultiIndexEntities context, int skipCount)
      {
          EntityModel.Name entity = context.Names
                                          .OrderBy(r =&gt; r.EntityId)
                                          .Skip(skipCount)
                                          .FirstOrDefault();
  
          return entity;
      }
  </code></pre>
  
  <p>Now, I'm wanting to refine this more. Each of the entities held in my table has a unique ID value and type value. What I'm wanting to do is re-write my method allowing me to pass in these values and return that entity.  </p>
  
  <p>I'm new to both linq and entity framework in general and this is my attmpt so far:</p>
  
  <pre><code>   private static EntityModel.Entity GetEntity(EntityModel.MultiIndexEntities context, int registrationTypeId, string name)
      {
          EntityModel.RegistrationType registrationType = context.RegistrationTypes
                                                             .Where(p =&gt; p.RegistrationTypeId == registrationTypeId)
                                                             .Where(p =&gt; p.Description == name);
  
  
          return registrationType;
      }
  </code></pre>
  
  <p>As I said, I don't know what I'm doing. Could someone please help me out?</p>