Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi!

I am trying to write a linq query in my Database.cs file. I find it difficult. Is there any tool to convert sql to linq? I tried linqer but it is no good. Or could you help me in writing the following query in linq.

SQL
update table set field1='R', field2='" + DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss") + "', field3 = '" + util.CleanStringInput(value1) + "' where field1 = 'P' and field3 = '" + value2 + "' and field4 = (select max(field5) from table2 where field6='" + value2 + "')


Thank you
Posted

1 solution

try to use LinqPad[^]
 
Share this answer
 
v2

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