Thanks for yours answers.
Marek Istvanek:
MyDataAccesObjectLayer.Save does not need to know anything about Customer properties in order to implement it with db4o.
Agree, but I am looking for a universal solution, who can work with db4o and for another database, like a SQL one.
Dario Quintana:
Here I make an example of how to build a 3 tiers app in C# with Spring.Net and Db4o, it's just a begining.
Interesting example, Dario, thanks for it. It does not answer to my question, because using db4o, you can pass the object to the .save() method of the db4o object, it is able to save it with its private properties. But if I use another database like MS SQL, I have to find another solution.
I just realized that I could look in the db4o code, to see how it does to save objects! But someone on another forum gave me another solution. To make an interface in a separate package, to implement this interface in the business object to expose private fields, but with explicit interface, and to make the interface reference available only to the BO assembly and to Data Layer assembly. So other assemblies could not use the interface to access private fields of the BO, but the Data Access Layer could. I think I’ll go with this solution.
Now, I did not know Spring.Net. I see in your AppContext class that it can read config file and create instance from them. That is very interesting. Too bad that my project will start very soon now, I have no time left to study Spring.Dot net, who seems a little complex.
Richard