title: Cannot convert from one model to another model
body: <p>I am trying to save into two different tables. Taking data from Taxlaw and while saving, I save the same data in taxlawhistory table. So it's like copying data from one table to the other table and it's not working. The error I keep getting is </p>
  
  <blockquote>
    <p>Cannot convert from Model.TaxLaw to Model.TaxTableHisory</p>
  </blockquote>
  
  <pre><code>public  async Task&lt;bool&gt; SaveOrUpdate(IEnumerable&lt;TaxLaw&gt; obj)
          {
  
  
              using (var trans = _taxhistoryrepo.DbContext.Database.BeginTransaction())
              {
                var lists = new List&lt;TaxTableHistory&gt;();
  
                  foreach (var list in obj)
                  {
  
                          lists.CompanyCode = list.CompanyCode;
                          lists.CummulativeAmount = list.CummulativeAmount;
                          lists.Percentage = list.Percentage;
                          lists.ModifiedDate = DateTime.UtcNow;
                          lists.ModifiedDate = list.ModifiedDate;
                          lists.Status = EntityStatus.Active;
  
                          _taxhistoryrepo.DbSetEntity.Add(lists);
  
                          await  _taxhistoryrepo.DbContext.SaveChangesAsync();
                          await  Task.FromResult(_repository.SingleSave(obj));
  
                   }
                  trans.Commit();
              }
              return true;
  
          }
  </code></pre>