Hi,
can anyone tell me, is sql injection is possible in linq
Sql injection in linq
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Princy GuptaRank #1,602 · 982 reputationPosted May 9, 2014, 10:40 AM EDT
SQL injection is taken care of in linq queries.
LINQ to SQL passes all data to the database via SQL parameters. So, although the SQL query is composed dynamically, the values are substitued server side through parameters safeguarding against the most common cause of SQL injection attacks.
Found an interesting article @http://www.dotnetspark.com/kb/2040-eliminate-sql-injection-attacks-with-linq.aspx
Bhabani PrasadRank #8,369 · 223 reputationPosted Jun 11, 2014, 12:55 AM EDT
Lakshmanan Sethu SankaranarayanRank #124 · 17.7K reputationPosted Jun 11, 2014, 2:27 AM EDT
yes its avoided in Linq to SQL.
please refer the interesting articles
http://www.devx.com/dotnet/Article/34653
http://forums.asp.net/t/1884940.aspx?linq+prevent+sql+injection