Tech Off Post

Single Post Permalink

View Thread: How Do *You* Do Data Access in .NET?
  • User profile image

    I like to use simple queries DataSets to initialise objects. That way you keep your Object Orientation which may make it easier to adear to business rules.

    I don't really use an Object Relational (O/R) system. Although, I can see why people would, it effectively takes the burden of developing custom business classes of the system designers. You just need to make sure you get the correct object model in your database.

    A quick tip, avoid running large queries from class constructors to initialise business objects. Try to impliment a .Load(SqlGuid rowID) method. Unless this really does not seem natural. Constructors should be quick and anyone programming againt your business objects won't expect them to take time to load.

    As with any rule, there are always exceptions.