views:

128

answers:

2

Hi, I have a collection of orders. I would like to hit the database once, retrieve the orders, store them and then be able to access this collection over multiple forms. I know in asp.net, you can use things like Application Object or Session Object but how do you do it in a win form app? I was thinking of creating a static collection that could be accessed through multiple forms, classes, or wherever. Does this sound right and is it even feasible?

thanks

A: 

You should have some Data Object that accesses the database anyways, right? Wrap that in a CacheProxy class, that hits the database if it doesn't have a local copy. I hear you can use the System.Web cache in Winforms as well.

Jimmy
+1  A: 
Vyas Bharghava