Loading class objects from datasets
-
hi all, My business layer contains 1 object per table in my database. Object properties are the same as table fields. I get a dataset with 1 row back from my database when I instantiate my objects. Is there a way to load this dataset into my object properties (fields)? without having to traverse and match the nodes on the dataset to my properties? this way, I can use the same method for all my objects AND I dont have to worry about the function if I change my object or table. any ideas? thanks M
-
hi all, My business layer contains 1 object per table in my database. Object properties are the same as table fields. I get a dataset with 1 row back from my database when I instantiate my objects. Is there a way to load this dataset into my object properties (fields)? without having to traverse and match the nodes on the dataset to my properties? this way, I can use the same method for all my objects AND I dont have to worry about the function if I change my object or table. any ideas? thanks M
Hi You could use reflection for this. ---------------------------- Be excellent to each other :) EasiReports[^] My free reporting component for WinForms.
-
Hi You could use reflection for this. ---------------------------- Be excellent to each other :) EasiReports[^] My free reporting component for WinForms.
how? is there an example somewhere out there?