Using Repository classes in separate threads

16 views
Skip to first unread message

costa

unread,
Feb 9, 2012, 8:43:23 PM2/9/12
to S#arp Architecture
This is a somewhat related to this:

https://groups.google.com/group/sharp-architecture/browse_thread/thread/b0aad1fc9eabdd74

Within the context of an MVC3 web app, I have the following scenario:
I need to periodically check a sql table for changes and then refresh
some data. Now, this procedure executes on a different thread than
than a normal http request thread. If I want to use the same
repository classes I use for the normal web requests how do I
proceed?

One idea would be to use a hybrid ISessionStorage that returns the
storage from the HttpContext if there is any HttpContext, otherwise it
gets it from the thread via a LocalDataStoreSlot.

Any other suggestions?

I am using S#arp Arch 1.9.x.

Thank you



costa

unread,
Feb 9, 2012, 8:47:14 PM2/9/12
to S#arp Architecture
Reply all
Reply to author
Forward
0 new messages