title: How to make the below code generic?
body: <p>I have a method as under</p>
  
  <pre><code> private int SaveRecord(PartnerViewLog partnerViewLog, PortalConstant.DataSourceType DataSourceType, Func&lt;IDataAccess, PartnerViewLog, int&gt; chooseSelector)
              {
                  int results = -1;
  
                  var dataPlugin = DataPlugins.FirstOrDefault(i =&gt; i.Metadata["SQLMetaData"].ToString() == DataSourceType.EnumToString());
  
                  if (dataPlugin != null)
                  {
                      results = chooseSelector(dataPlugin.Value, partnerViewLog);
                  }
                  return results;
              }
  </code></pre>
  
  <p>I am invoking it as under</p>
  
  <pre><code>public int SavePartnerViewLog(PartnerViewLog partnerViewLog, PortalConstant.DataSourceType DataSourceType)
          {
              return SaveRecord(partnerViewLog, DataSourceType, (i, u) =&gt; i.SavePartnerViewLog(partnerViewLog));
          }
  </code></pre>
  
  <p>As can be figured out that PartnerViewLog  is a class. Now I want to make the function SaveRecord as generic where the class name can be anything?</p>
  
  <p>How to do so?</p>