views:

60

answers:

1

I'd like to know what the advantage of using a DataRelation in .NET is, as opposed to crafting the relationship in the data layer itself? Or is this largely a decision by the developer about which tier to place their logic in?

+3  A: 

A DataSet (and its various components) basically functions as an in-memory representation of table-based data, and is most useful for allowing a client application to work with data in a disconnected state. Therefore, a DataRelation shouldn't normally function in place of a data relation defined in your database; rather, it should function as an emulation or representation of that relationship defined elsewhere.

Architecting your system so that a data relation is defined only in your client application in the form of a DataRelation would be a bad idea, IMHO.

MusiGenesis