Storing your data in Graffiti the easy way

Posted on Tuesday, March 25, 2008

I've been asked by a few people the easiest way to store your data inside Graffiti. Most people start the question with "How do I add tables to the database ....". You could do that, but it would be complicated and annoying to deploy to other users. Simply use the ObjectManager and all your code will move to any Graffiti installation with ease.

Here it is, in less than 2 minutes....

add a reference to Graffiti.Core, make an object... mark it serializable

[Serializable]
public class MyObject
{
   private string _name;
   private string _description;

   public string Name
   {
       get { return _name; }
       set { _name = value; }
   }

   public string Description
   {
       get { return _description; }
       set { _description = value; }
   }
}

instantiate and call Save..

MyObject obj = new MyObject();

ObjectManager.Save(obj, "MyObjectSettings");

retrieve it later..

ObjectManager.Get<MyObject>("MyObjectSettings");

That's it!

Jayme

Comments

  • ricky on 5.07.2009 at 1:51 AM
  • thank you, very usefull script!

  • Sulumits Retsambew on 8.08.2009 at 5:45 AM
  • Very useful code. Thanks.

  • Italian Translation on 8.08.2009 at 9:44 AM
  • Thanks mate,I was looking for that info nearly 2 days!There is not match support for Graffiti.

  • rusli zainal sang visioner on 8.25.2009 at 1:35 AM
  • great site

  • Fisho on 8.25.2009 at 8:10 PM
  • Is that all? It's too easy to be true, but it absolutely works. Nice and thanks.

  • stop dreaming start action on 9.03.2009 at 10:20 AM
  • thank you for nice tutorial.

  • RUSLI ZAINAL SANG VISIONER on 9.03.2009 at 10:21 AM
  • that great tutorial

  • mengembalikan jati diri bangsa on 9.23.2009 at 9:13 PM
  • great share

  • mengembalikan jati diri bangsa on 9.23.2009 at 9:13 PM
  • great one

  • kenali dan kunjungi objek wisata di pandeglang on 9.23.2009 at 9:15 PM
  • hemmm very nice

  • English to Italian translation by Lingua21 on 9.30.2009 at 5:27 AM
  • Great piece of code. Many thanks.

  • kenali dan kunjungi objek wisata di pandeglang on 10.07.2009 at 8:58 PM
  • very great info

  • Colon Cleanse on 10.08.2009 at 6:54 AM
  • I tried every normal windows method and explorer, that I could think of as well as several supposedly great utility programs that I was told to try.

  • games online on 10.09.2009 at 1:54 AM
  • Good post, please keep it up.

  • river belle casino on 10.09.2009 at 12:32 PM
  • the easiest way to store your data inside Graffiti. Most people start the question with "How do I add tables to the database .........

  • games on 10.12.2009 at 5:18 AM
  • Simply use the ObjectManager and all your code will move to any Graffiti installation with ease

  • Omar on 2.05.2010 at 9:14 AM
  • Well, thats one way to look at it I guess.

  • promozioni sul gioco al casinò on 2.19.2010 at 1:22 AM
  • Well I’ve had my itouch since October. I’ve noticed that the battery goes by supper quick when I go on safari and watch movies. Other than that my batter can last me all day… even though its set on the brightest it can get. Just limit your usage of safari or videos if you want your batter to last a while.

  • Online Casino on 2.22.2010 at 8:59 AM
  • Wonderful Article! I have bookmarked this page and I love to share this with my friends and circle of influence.

  • Associate Degree Clinical Psychology on 2.25.2010 at 5:49 AM
  • I especially like the pick, "Lover, You Should've Come Over" from Grace that is reportedly integral to the production - which merges the 1990's Buckley songs with original 1590's dialogue taken from Shakespeare. Also known to be included is the more raucous, "Eternal Life," also off Buckley's sole studio release. There is no confirmation about any material from posthumous releases.

  • Bachelor Degree Clinical Psychology on 2.25.2010 at 5:49 AM
  • I'm always wary of Shakespeare when modernized, not a fan of "Romeo + Juliet" or the like. The "+" sign was so clever, so modern. But this pairing has merit and could be a match made in heaven, if heaven were brimming with grievous sorrow.

  • Doctorate Clinical Psychology on 2.25.2010 at 5:50 AM
  • I especially like the pick, "Lover, You Should've Come Over" from Grace that is reportedly integral to the production - which merges the 1990's Buckley songs with original 1590's dialogue taken from Shakespeare. Also known to be included is the more raucous, "Eternal Life," also off Buckley's sole studio release. There is no confirmation about any material from posthumous releases.

  • PhD Clinical Psychology on 2.25.2010 at 5:51 AM
  • All cell phone companies are garbage. All concepts of customer support are lost on them.

  • Associate Degree Counseling Psychology on 2.25.2010 at 5:51 AM
  • [The most infamous image of Jeff Buckley, from the cover of Grace. Photo by Merri Cyr]

  • منتديات on 3.12.2010 at 4:23 PM
  • Well, thats one way to look at it I guess

  • توبيكات on 3.12.2010 at 4:24 PM
  • Great piece of code. Many thanks.

  • شمس الحب on 3.12.2010 at 4:25 PM
  • All concepts of customer support are lost on them

  • replica watch on 3.16.2010 at 4:33 AM
  • Well, thats one way to look at it I guess

  • replica watch on 3.16.2010 at 4:43 AM
  • Well, thats one way to look at it I guess

  • replica watch on 3.16.2010 at 4:44 AM
  • Well, thats one way to look at it I guess

  • العاب طبخ on 3.17.2010 at 12:56 PM
  • ddddfdffddfdf

  • العاب سيارات on 3.17.2010 at 12:56 PM
  • dfffddfdfdfdfdfdf

  • Essays on 3.21.2010 at 9:02 PM
  • this really is the easy way to store your grafitti. thanks for sharing.

  • computer monitoring software on 4.09.2010 at 2:58 AM
  • nice post here,thanks for share!thanks again!

  • Wholesale on 4.21.2010 at 11:57 PM
  • I give them a tag or two and save them off. A year from now for some reason, I need to get all of my electric bills.

  • generic cialis on 4.30.2010 at 6:06 AM
  • I really enjoyed reading you. Please keep sharing your thoughts with us

  • replica watches on 5.06.2010 at 12:43 AM
  • excellent

  • i need a loan on 5.11.2010 at 1:05 AM
  • For the most part, I agree with you.

  • used car loan fast on 5.11.2010 at 1:06 AM
  • This was really helpful!

  • casino en ligne on 5.11.2010 at 7:36 AM
  • nice article,i like it........thanks!!

  • jn0-532 on 5.13.2010 at 2:03 AM
  • learn-by-myself.im-blog.de blogs.albawaba.com/.../colten www.blog-agricole.com http://phillida.magicrpm.com/

  • livrare pizza on 5.18.2010 at 9:09 AM
  • Interesting points. Love the discussion

  • Dropship on 5.19.2010 at 3:27 AM
  • good site http://www.hq57.com .

  • rolex watches on 5.22.2010 at 10:05 AM
  • and change creates opportunity.Thanks a lot for enjoying this beauty article with me.

  • best ipad case on 5.23.2010 at 10:16 PM
  • thanks for share it..keep up good working

  • emmitt smith jersey on 5.28.2010 at 3:43 AM
  • Wonderful post, I will keep eye on you.

  • The Employment Law Group on 5.31.2010 at 7:48 AM
  • Its a pleasure reading your post.

  • louis vuitton on 6.13.2010 at 3:40 AM
  • I most definitely agree with what you have said here brightness with satin that you dont Thank you for another great article.

  • Earl Campbell jersey on 6.14.2010 at 1:06 AM
  • I thike I know it ,thanks for your advice.

  • casinos virtuels on 6.21.2010 at 8:34 AM
  • nice post......thanks for sharing!!

  • casinos virtuels on 6.21.2010 at 8:35 AM
  • nice.........

  • Stock Market Today on 6.21.2010 at 8:19 PM
  • Thank you for providing a very very useful information. It really helped me a lot!

  • replica handbags on 6.25.2010 at 11:00 PM
  • Thank you ,if I have trouble, I will contact you.

  • thermoelectric refrigerator on 6.26.2010 at 12:24 PM
  • hey, can you provide us OOP tutorial for PHP 5??

  • fiwedding on 6.29.2010 at 4:10 AM
  • hey, can you provide us OOP tutorial for PHP 5??

  • Hosting Murah Indonesia Indositehost.com on 7.01.2010 at 7:31 PM
  • good article with good idea

  • Blogger Indonesia Dukung Internet Aman, Sehat & Manfaat on 7.01.2010 at 7:34 PM
  • postingan menarik.. hatur nuhun ya

  • coach outlet on 7.06.2010 at 8:29 PM
  • very good, look forward to view your other articles.

  • replica watches on 7.10.2010 at 6:51 AM
  • Nice site! watchThe Tissot TTouch Expert Watch uses a Quartz Looking forward to another great article. Good luck to the author! all the best!

  • essay writing online on 7.12.2010 at 6:16 PM
  • Thanks for your interesting post.

  • custom essay writing services on 7.12.2010 at 6:21 PM
  • nice article. thank for sharing

  • essay writing service on 7.12.2010 at 6:22 PM
  • thanks for info

  • research paper online on 7.12.2010 at 6:23 PM
  • thanks to you for this great article very useful information for readers. keep your information in my mind.

  • college term papers on 7.12.2010 at 6:24 PM
  • thanks for sharing

  • college essays on 7.12.2010 at 6:26 PM
  • nice blog. thank for sharing

  • loho on 7.13.2010 at 6:54 PM
  • www.cheapairmaxs.com/.../nike-air-max-18 nike air max 180

    www.cheapairmaxs.com/.../nike-air-max-36 nike air max 360

    www.cheapairmaxs.com/.../mens-air-max-lt mens air max ltd

    www.cheapairmaxs.com/.../womens-air-max- womens air max ltd

    www.cheapairmaxs.com/.../nike-air-max-bw nike air max bw

  • fake watch on 7.16.2010 at 2:54 AM
  • Thanks for your interesting post.

  • James on 7.18.2010 at 10:59 PM
  • This is all very interesting information. I will be very useful.

  • vibram fivefingers on 7.21.2010 at 2:26 AM
  • This is all very interesting information. I will be very useful.

  • West Java on 7.21.2010 at 1:11 PM
  • thanks for sharing.. i like this posting

  • Jaylynn on 7.21.2010 at 8:32 PM
  • This is really easy. I can not wait to try it.

  • replica watches on 7.21.2010 at 11:31 PM
  • I admire the valuable information you offer in your articles. from this watch brand Hope to see more from you..

  • chanel handbags on 7.22.2010 at 1:29 AM
  • 2010 chanel handbags hot sale on buybury.com, you can discover all kinds of fashion chanel handbags in free shipping worldwide, and buybury.com provide chanel bags are all 70% discount, that attracted numerous chanel funs, and you can place an order for cheap chanel handbags will have the same discount. If you are looking for chanel handbags now, do not hesitate, chanel hobos on our site is really noble but cheaper. All chanel bags really are wonderful.

  • tiffany jewellery on 7.22.2010 at 1:53 AM
  • This is all very interesting information. I will be very useful.

  • niche products on 7.23.2010 at 1:52 AM
  • Thank you for the info, it really helps.

  • Carol on 7.24.2010 at 9:52 PM
  • This is something that I have never given much thought about. I will have to give it some thought now. Thanks for the info.

  • Gucci bags on 7.25.2010 at 9:21 PM
  • I'll bookmark your blog and visit it weekly for your new posts...

  • replica watches on 7.26.2010 at 2:27 AM
  • www.kopeez.com/.../Stuhrling-30.ht

  • cosplay on 7.26.2010 at 4:10 AM
  • I have been reading your posts frequently. I need to say that you are doing a fantastic work. Please keep up the great work.

  • cosplay on 7.26.2010 at 4:10 AM
  • I have been reading your posts frequently. I need to say that you are doing a fantastic work. Please keep up the great work.

  • replica watches on 7.28.2010 at 2:41 AM
  • Have a look at www.watchesimple.com/.../emporio-armani- to get high quality replica watches at a very low price!

  • يوتيوب on 7.28.2010 at 4:26 PM
  • good tanks yuo

  • louis vuitton on 7.29.2010 at 2:31 AM
  • This is my first time i visit here.Thank for sharing the information. beaded handbag You can easily make

  • replica watches on 7.30.2010 at 9:06 PM
  • It is a very nice stuff you are sharing us! Thanks for it !You made a good point about the blind spots.I like your article!I really like it, you write well,Thank you for sharing, I will always come back.

  • replica handbags on 7.30.2010 at 9:09 PM
  • Amazing post! thanx a lot! i hope i will back here soon,Thanks for this information, it was very helpful. Keep up the good work.This is very helpfull for me .Thanks,Great entry. I was helpful.

Leave a Comment


Search this site

Last 3 Tweets

  • @christianaspnet hehe - helps me focus :)
  • I used to give @averyj so much crap about drawing little boxes/shapes while on the phone or in a meeting... but wow, it really does help!
  • @StevenRay that mouse is sexy, but it would take some getting used to for me. I tried one out but it was so heavy.