How can save data with linq ? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

How can save data with linq ?

How to save data in sql with linq in c # (Windows)? What is its query code?

22nd Sep 2021, 11:44 AM
Simin Zare
Simin Zare - avatar
2 Respostas
23rd Sep 2021, 3:31 AM
Anurag Saikia
+ 1
First of all, I must appreciate Ƃnurag $aikia[Exams Till 5octšŸ˜“šŸ‘‹šŸ‘‹]. Let's introduce you to another way to solve this problem. Now you can use an entity framework. TheĀ DbSetĀ class is derived fromĀ IQuerayable. So, we can useĀ LINQĀ for querying againstĀ DbSet, which will be converted to an SQL query. EF API executes this SQL query to the underlying database, gets the flat result set, converts it into appropriate entity objects and returns it as a query result. For more info, please read this article: https://www.entityframeworktutorial.net/querying-entity-graph-in-entity-framework.aspx
30th Sep 2021, 8:59 AM
hossein B
hossein B - avatar