devonl wrote:
sorry for the delay in responding...
i'm not really sure why you would create "datasets" and not objects (or a collection of objects) and pass then to your DAOs. why do you feel you need to use a "dataset?"
Hello Devonl!
I'm thinking to use DataSets junt in the interface layer to keep the data in memory before save them. I don't know how to use collections. Is it possible? Simple? :)
My app has three layers:
- Interface
- Logic
- NHibernate
Has any other way to do a master/detail without datasets? Using collections is difficult?
My Logic layer just work with Objects. So, in my interface I move the records from dataSets to objects/collections and then I call the Logic Layer. For example, the button Save:
// load the master (any object)
...
// load the details
List<Person> p = new List<Person>();
foreach (PersonRow row in DataSetPerson.Rows)
{
p.Add(new Person(row.Id, row.Name));
}
// save all
master.Save(...) // this will save the master and details
So, what do you thnik about it? Should I use another approach to move my data from interface to logic layer?
Thanks!