Documentation: 'Saving Your Class'

Nov 3, 2010 at 6:54 PM
Edited Nov 3, 2010 at 6:59 PM

In the documentation there seems to be a big jump from the section 'Using Sterling' to the section 'Saving Your Class' with no explanation of what needs to be done in between.

I cannot arrive at a situation where I can simply type: 'var key = myDatabase.Save(myContact);' despite trying several different things.  The example database is a bit too complex here to shed any real light on this difficulty as well. 

How do I arrive at the situation where I can simply type something like:

Contact myContact = new Contact() { blah, blah, blah };

var key = myDatabase.Save(myContact);



Nov 3, 2010 at 7:33 PM

It wasn't intended to be a big jump. I updated it to better reflect the staged example. "myDatabase" is really DatabaseService.Current.Database based on the implementation before that. Let me know if that helps.

Nov 3, 2010 at 7:56 PM

I'd figured this out just before I read your post, but in order for it to work I needed to put the below in my App.xaml file:

x:Class="SA_STERLING_2.App" >