A typed DataSet is a DataSet in which all DataTables are obviously known and can be accessed by name. In turn, DataTable is also known and you can get access to fields without literals and without coercion to a specific type. Ie, the work becomes like working with a class that has fields.

Tell me, how is this done? What are the possible pitfalls (are there any filling features via DataAdapter.Fill? Or deserialization)? What is better to override in its extended classes?

If this is possible, then a sample with a typed DataSet would not hurt, where there are 2 tables that relate to some field.

I want to do something like this:

https://msdn.microsoft.com/en-us/library/mt710792.aspx

But again, they do not write about the pitfalls and about the fact that it is better to override them in extended classes.

  • one
    IMHO, whenever there is a possibility, you need to use a typed DS, let Microsoft work for you. In order to answer your questions about the pitfalls - you need the details of what you want. - Alexander Muksimov
  • IMHO, it is necessary to build a typed DS correctly using the "designer" built into VisualStudio. With it, you can, having previously connected to the database, form the necessary subcircuits and supplement it, if necessary, with elements that are not in the original database. Obviously, a more reliable way to access methods and objects of automatically generated classes than to call them by name. This is all under the link to msdn that you gave. - Alexander Muksimov
  • In the same way, the built-in designer allows you to easily create and supplement adapters with the necessary methods, however, you need to remember that adapters can correctly work only with queries that contain all the columns of the table to which it is associated. If you need to work with a sub-copy, then the easiest way is to make an additional dummy table (view) with your adater. This is also all described in MSDN. - Alexander Muksimov
  • The pitfalls are the same as in the use of automatically generated code. There is another pitfall - the speed of work, which depends on the number and type of fields that the adapter drives back and forth. If there are BLOB fields in the table that are rarely needed, and speed is critical, then it’s better to work with the table bypassing the adapter. - Alexander Muksimov
  • one
    I do not understand your problems at all, please tell us more about your task. What causes you difficulty? - Alexander Muksimov

0