Monday, August 20, 2012

SQL to LINQ, LINQ to Lambda so (SQL to Lambda)

Converting SQL to LINQ then LINQ to Lambda
So we can also convert SQL to Lambda expressions.....

Everyone knows sql very well, it's easy to think your app logic in SQL queries. But in the c# codes, you want to query using linq or lambda  expressions, its very difficult to construct such queries sometimes. So follow the steps below, you will easily convert your SQL queries to linq/lambda expressions.

2 steps you need to follow,
1. Write you app logic query in SQL then convert it to LINQ through SQLtoLINQ tool.
2. Copy the result LINQ query from linker to LINQPad & execute, press 'lambda' symbol to show Lambda
Expression.

Happy Coding....