7

Im using .net 4.0 and when I talk to a database using SqlConnection class etc is this still ADO.net or has that dinosaur died?

7
  • 9
    Dinosaurs never die, they just turn into oil and run our cities. Jul 12, 2011 at 17:58
  • 2
    Why on earth was this closed as not constuctive? Its a question, and very relevant meaning. Its concise and it in no way is an opinion!
    – Exitos
    Jul 12, 2011 at 18:02
  • 1
    Is the .NET SQL stuff (e.g. SqlConnection, SqlCommand) separate from ADO.NET or are they inseparable at this point? <-- This is what I got from the question. The Sql* is used when dealing with LINQ2SQL, at the very least. I've never dealt with EF but imagine it functions a the "common base" for ORMs, much like "DBI" in Perl or Ruby, for instance.
    – user166390
    Jul 12, 2011 at 18:02
  • 2
    @Pete2k Indeed. Voting to re-open.
    – user166390
    Jul 12, 2011 at 18:03
  • 2
    @Chris Lively, im not sure what your saying is true. Many questions that appear on stackoverflow 'could' be answered through reading the documentation. Doesnt mean they are not constructive. Saying that it adds nothing to stack overflow is also not accurate. For one anyone who searches google for 'does .net still use ado.net?' will get this post as the first result. Secondly at what point can you say 'sorry your question isnt valid' please go and read the instructions? I mean I could say that to anyone who posts on here. Ok well the question is now open it would seem by consensus, thanks!
    – Exitos
    Jul 14, 2011 at 8:37

4 Answers 4

7

ADO.Net is alive and well. Just about every ORM out there for .net is built on it so it's not going away anytime soon.

1
  • lol chris I thought my question wasnt constructive mate hehe. Thanks for your response.
    – Exitos
    Jul 14, 2011 at 8:40
6

The SqlConnection class is derived from the DBConnection class, which is part of the System.Data.Common namespace (i.e. ADO.NET).

As others have pointed out, ADO.NET is the foundation on which Linq to SQL and the Entity Framework are built. ADO.NET has not been replaced, it's just been enhanced and built upon.

5

Yes. In fact, ADO.NET is more integrated with new language features and technologies than ever before. Linq to SQL and Entity Framework sit on top of and use ADO.NET to interact with databases, for example.

5

That dino's not dead...

http://en.wikipedia.org/wiki/ADO.NET

The ADO.NET Entity Framework is a set of data-access APIs for the Microsoft .NET Framework, similar to the Java Persistence API, targeting the version of ADO.NET that ships with .NET Framework 4.0.

1
  • 1
    Erm... ADO.NET and EF are not quite the same thing, despite Microsoft's insistence on creating confusion by mixing the names together. Jul 12, 2011 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.