Hello,

I use NHibernate + NHSpatial for more than 1 year but still I am the 
beginner. All apps I created was simple "one window" tools. Now I want to 
create little complicated app that uses Master-Detail approach and 
DataGridView.

If I populate the DataGridView by pseudo-code command sequence:
- IList<A> ListA = ISession.CreateQuery("from A").List<A>()
- DataGridView.DataSource = ListA
then all UPDATE and DELETE commands are handled by NH well (when I call 
ISession.Flush or ITransaction.Commit). But how to handle new records? If I 
create new object A (A a=new A()) then this object is not handled by NH - 
is there some function that "registers" this new object for NH? I want to 
create "Add" button at the form with DataGridView. When the user press the 
button then I want to add new row into the DataGridView, then user can 
populate the empty columns, edit and/or delete all other rows. And when he 
press the "Save to DB" button then I want to save all rows to DB. Is this 
way wrong/blind? Is there some better/suggested way for this?

I appreciate all your suggestions.

Best Regards

IvoD

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to