To get an instance of a data store object:


DataStore store = DataStore.GetStore(SPContext.current.web);


To save data to the store:


DataStore store = DataStore.GetStore(SPContext.current.web);

MyKeyObj key = new MyKeyObj("8854336452648");
MyDataObj data = new MyDataObj();

store.Add(key, data);


To retrieve data from a data store instance


DataStore store = DataStore.GetStore(SPContext.current.web);
MyKeyObj key = new MyKeyObj("8854336452648");

MyDataObj data = store[key] as MyDataObj;

Last edited May 9, 2010 at 5:48 AM by Alcero, version 1

Comments

No comments yet.