library managment object model
-
Hello, I am designing a Library Managment system for a school project. It includes 3 main constructs behind the UI: Member - contains details about a member including a unique ID (using GUID's) and an array of Loan objects. Book - contains details about a book, a unique ID and a reference to a single Loan object. Loan - contains due date, issue date, unique ID and references to both the Member and Book which the loan is based upon. Everything is fine up to here but once it comes to saving/loading this data problems appear. I want to have three seperate files, one which contains all the Books, one containing Members and a third containing all the Loans. Now the obvious way todo this would be to simply save the ID of the object if it is contained in a seperate file so for example the Loan object would be saved containing two GUIDs, one pointing to the Member and one pointing to the Book. That's all fine and dandy but when it comes to loading the files how should I approach creating the individual objects? I don't really want the complications of loading and saving to shine through in my object model as that would be bad design. Any suggestions? I am using C# to build this project by the way. Thanks, Daniel