Monday, March 07, 2011

Blobs, RIA Services, Images, SQL Server and add a little MVVM and you get Pie! (Okay, no pie, but still something that looks pretty yummy)

Mister Goodcat - Storing images in SQL Server with RIA Services

"In the Silverlight forums people frequently ask for help with storing images in their databases using RIA Services. Even though this looks like a pretty common thing to do, it is far from being straight forward, and searching the web does not seem to produce any good results (or I'm just doing it wrong). So I decided to write this quick walk-through of how to do that. This post describes all steps and possible pitfalls to create a complete application for this from scratch, from the database to the UI.

Table of contents:

  • Preface
  • Setting up the project
  • Creating the model
  • Setting up the image entity
  • Setting up the image data entity
  • Setting up the relation
  • Creating the database
  • Problems with the database generation/rework
  • Creating the domain service
  • Downloading MVVM Light with NuGet
  • Creating a simple client UI
  • Extending the client side model
  • Conversion of the images
  • The view model
  • Loading the available images
  • Loading the selected image's data
  • Deleting images
  • Adding new images
  • Further considerations
  • Potential problems
  • Summary and source code download

...

pagesnap..."

The depth of the book... err...  booklet... article... whatever... (if a post needs a TOC that's a long as the above TOC, is 17 pages printed, I think we can call it a booklet... ;) is what caught my eye. I've not done anything yet with RIA Services, but would like to, so wanted to capture this for future reference. That and image storage in SQL Server is always of interest to me...

No comments: