Click here to Skip to main content
14,697,231 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to linq insert into values and use subquery.For example insert into tables and insert select subquery.

Insert Into Students(ID,Name,Surname,Class,ClassType,ClassID)(Select ID,Name,Surname,3,A,A1) from StudentsType where ClassType=A group by Id,Name)


What I have tried:

var subquery=from a in StudentsType
             where ..... etc.


var insertquery=   .....    // I dont insert StudentsType to Students table.
Posted
Updated 27-Oct-19 11:33am
v2

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900