I've used Delphi for the past 12 years, but now I need to get up to speed in C#. Since both systems were designed by the same person, there are lots of similarities. However, C# seems to have a big gap when it comes to centralized data access. All of the examples I've seen show the connections, commands and datasets and so forth all being placed on individual forms with no interconnection.
The applications I work with have numerous primary and support tables with related queries and so on. If I have to redelcare these in every form where they are used, the code overhead will be huge and maintenance becomes a nightmare because I must make changes in multiple locations.
Delphi provides a container class called a 'data module' where connections and data access components can be installed during design. Data modules are also used to hold support code for events, business rules and so forth all in one place. Once defined, data aware controls in forms or other units can access those components as need be either during design or run time. This obviously reduces code and makes design and maintenace much easier.
I am assuming there is some way to do this, or at least achieve the same end, in .NET. However, I haven't come across an answer yet. Can anyone point me in the right direction? I don't want to do any serious work until I figure this problem out. Thanks.