title: How i foreach loop in listitems values entity framework
body: <p>I have 2 lists. One has 3 records like 1 , 2 , 3 and seconds list holds table records. All i wanna do add first list values to second list. </p>
  
  <p>I hope <a href="https://i.stack.imgur.com/qs54x.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qs54x.png" alt="this picture"></a> helps.</p>
  
  <pre><code>foreach (var itemAgent in listofValues)
  {
      foreach (var item in formSorgu)
      {
          #region MyRegion
          CrmDonusleri crmEkleme = new CrmDonusleri()
          {
              AradigiBolge = item.bolge,
              AramaTarihi = Convert.ToDateTime(item.aratarihi),
              Musno = item.musno,
              GeriDonusYapildiMi = false,
              AtanmaTarihi = DateTime.Now,
              KanalAdi = item.kanal,
              ProgramAdi = item.program,
              AtananAgent = itemAgent
          };
          DbContext.CrmDonusleri.Add(crmEkleme);
          #endregion
      }
  }
  DbContext.SaveChanges();
  </code></pre>
  
  <p><code>listofValues</code> hold 3 records and <code>formSorgu</code> hold 2000 records. <code>listofValues</code> as List One and <code>formSorgu</code> as <code>List Two</code>. And i want my final list like Picture below.</p>
  
  <p>I don't think my code is right. Please show me the right way to write this query.</p>
  
  <pre><code>for (int i = formSorgu.Count + 1; i &gt;= 0; i--)
  {
      foreach (var itemAgent in listofValues)
      {
          CrmDonusleri crmEkkle = new CrmDonusleri()
          {
              Musno = formSorgu.FirstOrDefault().musno,
              AtananAgent = itemAgent
          };
      }
  }
  </code></pre>
  
  <p>when i use this code it gets one record from <code>formSorgu</code> but add to <code>listofValues</code> 3 times i just want it to foreach one time and go out from <code>foreach</code> loop and carry on other for loop record.</p>