What is ADO.Net for C #?

6

I'm starting to learn about C # for Web applications, and wanted to know what is ADO.Net and what are the advantages of using it?

    
asked by Carlos Ferreira 04.10.2015 в 17:25
source

1 answer

8

You can use it with any language compatible with .Net. C # is the main one.

You have basic information in our tag . And official page . Wikipedia .

It is the basic mechanism for accessing the database used by .Net. It is advantageous in this regard. Not in comparison to anything else. It gives functionality to the development platform.

It is a framework with the basic infrastructure for communicating with the mechanisms that manage the databases. They also have some facilities to abstract this data in the application. But these functions are being used less and less and you make use of so called ORMs, like the Entity Framework ( Core ), NHibernate or the simplest ones like the Dapper .

When you use an ORM, ADO.Net becomes transparent or unnecessary. But if you want to do everything at hand and in a simpler, more crude way, ADO.Net is more interesting. Not always what is "more modern" is the best solution for everything.

You can also use other mechanisms such as OleDB or ODBC, even though they are linked to ADO.Net. They are considered obsolete or alternative only when the native ADO.Net of each bank can not be used for some reason.

The basic functions of it are:

  • open and sustain a connection
  • set up and execute queries
  • iterate over the obtained data
answered by 04.10.2015 / 17:41
source