L
LC
Hi,
Anybody have a design pattern to implement persistent objects. I need to
persist my business objects. Something like this code examples:
//to create a new one
Document doc = new Document("my first document", DateTime.Now);
doc.Save();
....
//to open and edit an existing one
Document doc = new Document(DocumentId);
doc.Copies = 25;
doc.Save();
....
//maybe using lazy initialization when reading
Document doc = new Document(DocumentId);
Datetime authorBirthdate = doc.Author.Birthdate;
Thanks,
LC
Anybody have a design pattern to implement persistent objects. I need to
persist my business objects. Something like this code examples:
//to create a new one
Document doc = new Document("my first document", DateTime.Now);
doc.Save();
....
//to open and edit an existing one
Document doc = new Document(DocumentId);
doc.Copies = 25;
doc.Save();
....
//maybe using lazy initialization when reading
Document doc = new Document(DocumentId);
Datetime authorBirthdate = doc.Author.Birthdate;
Thanks,
LC