3,597 questions
Hi @kadir,
item.GenelBilgiid = 12; item.deger = false; no matter how many times the data is added
Do you mean no matter how many times you add data, item.GenelBilgiid is always 12; item.deger is always false;?
You can write directly into the for loop.
for (int i = 0; i < model.EgitimSeminerBilgiList.Count; i++)
{
TBL_EgitimSeminerBilgi item = new TBL_EgitimSeminerBilgi();
item.EgitimKonu = model.EgitimSeminerBilgiList[i].EgitimKonu;
item.EgitimKurum = model.EgitimSeminerBilgiList[i].EgitimKurum;
item.EgitimSuresi = model.EgitimSeminerBilgiList[i].EgitimSuresi;
item.GenelBilgiid = 12;
item.isDelete = false;
db.TBL_EgitimSeminerBilgi.Add(item);
}
Best regards,
Lan Huang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.