Should I learn "Raw" ADO.Net before learning Linq or Entity Framework?

When I first started learning how to make classic ASP, VBscript and HTML, someone told me to go out and buy Dreamweaver because “it would make life easier”, so I did it and it brought me my first professional job. The problem was when HTML, VBScript, and Classic ASP had problems, I had no idea how to fix this, and stayed at work for many late nights trying to figure out what I consider simple problems now, but obviously I wasn’t just at that time (a lot of stress).

With that said, I need to start learning about data access strategies in .NET, and I don't want to repeat it again. Should I learn raw ADO.NET ("raw" I do not mean ORM or Linq, but DataAdapters and Readers) and then Linq or ORM, or can I just go directly to the Linq / ORM stuff? I am not looking for a comparison with anything, I was looking for what would be better for me as a developer for a long time. Thanks.

+6
data-access
source share
8 answers

Don't worry about DataAdapters and Readers. It is like an abstraction like LINQ. If you know SQL relatively well, you are all set up. Just try to understand what types of queries are performed by the underlying technology, so you know when you need to switch to raw SQL in order to improve something.

+3
source share

Depends on how you define "learning."

I take for granted that what you really want to use for long-term work is LINQ and EF. Having prior experience with ADO.Net will not give you any help, since the usage model is too different.

On the other hand, it is useful to have an idea of ​​what is going on behind the scenes (especially with regard to how queries and DataReaders are mapped to actual open database connections).

I recommend taking a look at the API on MSDN and perhaps reading some examples there, but nothing more. It does not take too much time, and it will give you a feel for the usage model. If you later find yourself face to face with ADO.Net, you can always go back to more.

+3
source share

This helps to understand the layers below abstraction due to the law of flowing abstractions . This does not mean that you need to go out and master ADO.NET, but understanding the levels below ORM will help you when problems inevitably arise.

+2
source share

It is always better for the developer to know how the basics and basics work.

I see no harm at the beginning of learning ADO.NET. Understand datareader and disabled datasets and more, and then move on to newer features like LINQ.

+1
source share

I think you need to. Considering a basic look at this will not be costly. But understanding Connections, Commands, Adapters, and Readers can help you get rid of errors faster. Moreover, I’m sure that sometimes you can’t work with the Entity Framework for a problem, so you need a simple ASP.NET.

Cheers, Matthias

+1
source share

Not required as such to learn the traditional ADO.Net methods for moving to a linq data access / entity infrastructure. but in order to get a strong hold, I would advise you to find out. Because you may need time to debug a data provider problem for which you may need a database.

A direct jump can help you get the job done faster, but it won’t help miles ...

+1
source share

You should know about the basics of a database : transactions (very important), relational structures, constraints, etc. I think you do not need to know specific ADO elements such as DataAdapters.

0
source share

You do not need to learn about DataAdapters and Readers, because this knowledge cannot be transferred to work with ORM.

More useful would be to try to look at some complex queries and run them in a tool like SQL Server Query Analyzer. This will show where the queries will take time and help you optimize your LINQ queries by understanding what is happening under the hood.

It is also good to use SQL Profiler for LINQ queries.

-one
source share

All Articles