title: C# Generic Passing different objects with same properties
body: <p>I am not sure if what I am doing is possible.
  I have 2 methods.  The body of the 2 methods are exactly identical, however the signature of the method both parameter and return are different.   The passed in parameter's properties are changed and the object are different but have the same property name (They are two different Entity Framwork Entities).  Inheriting both from a base object is not possible (i think) because these are Entity Framework Entities.</p>
  
  <p>Best to show example then talk about it..</p>
  
  <p>Method 1</p>
  
  <pre><code>private static IQueryable&lt;MapListing&gt; ApplyMapFilterToListings(IQueryable&lt;MapListing&gt; listings, ListingSearchCriteria criteria, bool boolIsPremiumListingsOnly = false)
  {
      //setting properties of listings (of type MapListing Entity)
  }
  </code></pre>
  
  <p>Method 2</p>
  
  <pre><code>private static IQueryable&lt;vListing&gt; ApplyFilterToListings(IQueryable&lt;vListing&gt; listings, ListingSearchCriteria criteria, bool boolIsPremiumListingsOnly = false)
  {
      //setting properties of listings (of type vListing Entity)
  }
  </code></pre>
  
  <p>Generally I would not mind if the body of the function is exactly identical, however in this case a lot of properties are set conditionally and I want to make these methods exactly identical and idiot proof that they go out of sync.</p>
  
  <p>Also reason I am returing IQueryable&lt;> is because I do other stuff to it after returning </p>