Hello All !
1) At first, please excuse me my english :)
2) Explanation
I'd like to create a persistent database class that when the typed objects
are changed, the class automatically saves the data in the database engine
such as MSSQL Server.
Example:
Employee employee = new Employee();
employee.Name = "VÃ*tor";
myPersistentCollection.Add(employee); // generates and runs
// a
"INSERT INTO" SQL statement
employee.Birth = new Datetime(1980, 6, 23); // generates and runs a
"UPDATE"
// SQL
statement
myPersistentCollection.Remove(employee); // run "DELETE" SQL statement
// PersistentCollection is generic (PersistentCollection<T>)
I'd like catch all changes on typed classes and save. Then I read ftom the
article: http://msdn.microsoft.com/msdnmag/is...P/default.aspx,
about AOP and inherits the ContextBoundObject on target typed object classes
and sign then with a CallTracingAttribute (inherits from ContextAttribute).
Then I can catch all changes in the target classes.
3) The problem
The problem is that I can't catch the INSTANCE of target typed classes. I'd
like to take these instances to get a referenced collection object that has
information about database and save them.
Do anybody have a idea?
Much very thanks for all
VÃ*tor