In .net which class should I use to make it easier to work with data from DB (not including Entity Framework or LINQ)

QUESTION 1 - What .NET classes should I look for to help me read / update some data in the database, but assuming I am not using LINQ or Entity Framework. That is, if you go back to the main .net structure, which key classes to use.

Specifically, something that allows me to access data from table X using a C # / object type approach (as opposed to SQL)? I just need to do things like:

  • r1 = record from table X, where description = "xyz"
  • r2 = records from table X, where TableX.ref_id = TableY.id

QUESTION 2 - If there are no existing .net classes outside of LINQ / Entity Framework for this, then can I ask if there is a way to say, do a SQL lookup on a table and identify 1 specific record and then load that into the class .net that represents a string? for example has the same attributes on the class instance as in the database? What .Net classes will allow me to do this. If this is not possible, I guess it is a matter of creating your own data class and writing a manual function to load data into it?

thank

+2


source to share


1 answer


You want to use ADO.NET :



ADO.NET is an object-oriented set of libraries that allow you to interact with data sources. Typically, the source data is a database, but it can also be a text file, Excel spreadsheet, or XML file. For the purposes of this tutorial, we'll look at ADO.NET as a way to interact with the database.

+9


source







All Articles