Sharing Business Collections

Topics: Prism v2 - Silverlight 2
Jul 10, 2009 at 12:29 AM

Just starting to learn the framework, sorry for the newbie question.

I’ve got a few read-only collections that are core to the business and will probably be used by most modules.  In the WinForm world I’d usually create a singleton to store a collection.  What is the proper way using Prism to share collection data among several modules?

Thanks,
Todd

Jul 10, 2009 at 7:46 PM

Hi Todd,

The approach you have in mind is a good one. You could register a service that wraps the instances of the collections in the container used by your application (Unity by default), and access them from the different modules.

Please let me know if this helps.

Damian Schenkelman
http://blogs.southworks.net/dschenkelman