New Posts New Posts RSS Feed: where to store global collection of values
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

where to store global collection of values

 Post Reply Post Reply
Author
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Topic: where to store global collection of values
    Posted: 05-Jan-2011 at 5:22pm

Hi Bill,

 
Ideally, it'd be better if you created a service and passed it in the constructor of the view models.
You can find an example (the Bookshelf sample application) describing the above in our DevForce Resource Center.
 
You could also, create a static class with the controls (although I recommend you try the first suggestion).
 
Silvio.
Back to Top
BillG View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 05-Dec-2007
Location: Monroe, MI
Posts: 233
Post Options Post Options   Quote BillG Quote  Post ReplyReply Direct Link To This Post Posted: 31-Dec-2010 at 5:21am
I have a table call Controls which contains a list of controls which are in effect for  a particular client. I want to load the controls into an observable collection at the start of the app and then search the list during the running of the app to see if a particular control is set to Y or N. Where would be best place to store the collection so that it can be accessed by all view models?  In my app class?
 
Bill
 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down