Linq to Sql

Linq v/s Store Procedure

-> Debugging : It is difficult to debug a stored procedure but as Linq is part of .Net, visual studio debugger can be used to debug the queries.
-> Deployment : For stored procedure, additional script should be provided but with Linq everything gets compiled in to single DLL hence deployment becomes easy.
-> Type Safety : Linq is type safe, so query erros are checked at compile time.

DataContext class on Linq to Sql

-> DataContext class acts as a bridge between SQL server database and the Linq to Sql. For accessing database and also for changing the data in database, it contains string and functions.

Group By

Select

Join

Leave a Reply

Your email address will not be published. Required fields are marked *