Hi there!

Again, I am very new at DataObjects.Net, and I am just trying to figure out how to work with it.

In my past applications (which were not using DataObjects.Net) I used to provide a save method to my models. In this way I was able to create a form, create an instance of my model in it, work with that and on that instance, change its content/values and just at the end (when the SAVE button was pressed) I was invoking <model>.Save(). In this way, the object was storing itself - and all the inner modified objects - inside the database.

How can I do something similar with DataObjects.Net?

I was thinking to use the "DisconnectedState" feature, but even so, how can I create an instance of a model-object, modify it and save it at the end?

Thanks for your help!

Cheers, Gianluca.

Updated at 18.02.2010 14:42:39

Also... where is ApplyChanges? I can't find it :(

var config = DomainConfiguration.Load("mssql");
            config.UpgradeMode = DomainUpgradeMode.Recreate;
            var domain = Domain.Build(config);

            using (var session = Session.Open(domain))
                var disconnectedState = new DisconnectedState();

/* ..... */

                disconnectedState. // can't find ApplyChanges in here

Updated at 18.02.2010 15:06:49

Also... where is ApplyChanges? I can't find it :(

I guess it is in the 4.2.0 RC... I'm installing it now...

Cheers, GC

This thread was imported from our support forum. The original discussion may contain more detailed answer. Original topic by gianluca.

asked Feb 18 '10 at 13:49

Editor's gravatar image


Exactly. Earlier there was a method with different name - SaveChanges or something like this.

(Feb 18 '10 at 13:49) Alex Yakunin Alex%20Yakunin's gravatar image
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview


Once you sign in you will be able to subscribe for any updates here



Asked: Feb 18 '10 at 13:49

Seen: 1,657 times

Last updated: Feb 18 '10 at 13:49

powered by OSQA