title: How to convert T to object
body: <p>I am getting error to convert T to Entity</p>
  
  <pre><code>public T Add(T entity)
  {
      CAFMEntities db = new CAFMEntities();
      db.TabMasters.AddObject((TabMaster)entity);
      db.SaveChanges();
      return entity;
  }
  </code></pre>
  
  <p>It is giving me an error:</p>
  
  <blockquote>
    <p>Cannot convert type 'T' to 'CAFM.Data.EntityModel.TabMaster'</p>
  </blockquote>
  
  <p>Thanks.</p>