Hi, I was hoping that I could get some guidance from some of you guys on Object Design with Database back ends.
I am trying to build what could be considered to be my first full scale application, which is a student tracker (simplification). While I have a reasonable idea of how I would go about designing the classes for the system, the bit that I don't know how to do is, how I would go about getting the data to and from the database.
For example with my other applications, I have done a couple of things;
1) Gathered all the data when the application started up, creating the objects then. Then when the application closed sending the data back to the database.
2) Have the code which deals with getting the data in the specific class, so the student class for example would take only one constructor argument which would be the studentID, then the class code would connect to the database and populate the object fields as appropriate.
3) Variations of the above.
I have also looked into LINQ, which seems like it would be very useful if you don't expect your classes to deal with any business logic and just data, but I suppose it would be possible to create a wrapper class that would include the business logic.
Anyway I hope that some of you guys/girls would be kind enough to either point me in the direction of some articles that maybe you have found useful on this subject or your views on what is the best methods for doing this (obviously there isn't going to be one God design pattern for this sort of thing, but some are more generic than others).
Thanks for any help/comments/suggestions in advance.