Last post Aug 05, 2019 07:27 AM by samwu
Aug 04, 2019 09:18 PM|robby32|LINK
Aug 05, 2019 07:27 AM|samwu|LINK
According to your description, I couldn’t understand your requirement clearly.
Do you mean you want to insert value from table2 into table1 by linq?
If this is your requirement, I suggest you could try to use linq to sql as below code:
SampleDataContext linq = new SampleDataContext();
var str = from Test2 in linq.Test2
foreach (var val in str)
Test1 t1 = new Test1();
t1.Id = Convert.ToInt2(val.Id);
More details about how to use linq to sql, you could refer to this link: Linq to Sql
If I misunderstand your requirement, please post more details information about your requirement.