I am working in small company as a .Net developer.My doubt is that when to go for ADO.Net and LINQ and at what prospective to decide which to follow ADO.Net or LINQ (When to use ADO.Net and LINQ)? so many people told me that But I did not get clarity I am confident about experts of C# corner will get proper answer and as soon as possible.Thnaks in advance.
With Regards,
M.Jayanth.
Riddhi ValechaPosted Nov 29, 2013, 3:12 AM
I do agree with Sujit... ADO.NET is not a good option now..
If possible..... do everything with LINQ....
Jaganathan BantheswaranPosted Oct 20, 2013, 10:31 AM
Linq is different from ADO.Net.
In your asp.net project, if you want to access the DataBase effectively, you have to use anyone ORM like ADO.Net.
ADO.Net is an ORM & integral part of the .NET Framework, providing access to relational data[SQL], XML documents, and application data. You can use ADO.NET to connect/access data by using the new .NET Framework data providers which are Data Provider for SQL Server, Data Provider for OLEDB, Data Provider for ODBC, Data Provider for Oracle.
LINQ is a technique for querying data that is integrated into .NET languages such as C# and VB. Technically, LINQ is just the 'language' you can use to query objects. You can query Objects, XML, ADO.Net using Linq.
Now-a-days, in modern web development, its recommended to use Entity Framework as your ORM.
Sujit SahooPosted Oct 20, 2013, 9:45 AM
ADO.net 2.0 is outdated now. Using the database Queries in C#.net is really not a good idea. Earlier when Linq was not introduced then its OK, but after .net framework 3.5 Linq came to market. Using Linq you dont need to use Sql queries in C# program.
Also Entity framework using Linq is recommended DAL(Data access Layer) by Microsoft.
So its time to Upgrade (i.e. use Linq Queries instead of Old SQL Queries).