title: linq query that selects any object in the model
body: <p><strong>Edit</strong> <br/>
  To understand what i am trying to do i will give an example <br/>
  Suppose you used entity framework to generate multiple tables. Now you have MyDbEntities with objects (client, user, product, singer [attributes don't matter]). Now you create a method. This method gets an object as a parameter + MyDbEntities. The object would be a client, user, product, singer. In this method you have a query that given the object would return a list of that object. I am trying to create this method but i am still trying either with linq or sql but in vain so far 
  <br/>
  <strong>Update</strong> <br/>
  I tried this, it works, but not the way i want it to. to understand me check the code below. <br/></p>
  
  <pre><code>ViewBag.ok = LibMethods.get_all(MyDbEntities, "Client"); //Params = Entity &amp; String
  </code></pre>
  
  <p>this how i can my method below is my method</p>
  
  <pre><code>public static Object get_all (MyDbEntitiesce, String given_entity_type)
      {
          if (given_entity_type.Equals("Client"))
          {
              var get_all = from clt in ce.Client
                        select clt;
  
              return get_all.ToList().First();
          }
          else if (given_entity_type.Equals("Product"))
          {
              var get_all = from pdt in ce.Product
                        select pdt;
  
              return get_all.ToList().First();
          }
  
          return null;
      }
  </code></pre>
  
  <p>As you can see this method checks the object given and creates and returns a list of objects of that given_entity_type. here i return the first element just because i am doing this for tests. <br/>
  now suppose that i add a new object to <code>MyDbEntities</code> &amp; call it <code>Developer</code> i would have to update that method but i don't want to do that i want something generic that would work on any object i give it that exists in <code>MyDbEntities</code>. that's what i mean by generic/dynamic. </p>