This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
An application I'm making will have two threads using the Repository class. As the class is static, and because my threads aren't associated with a HttpContext I believe I'm going to eventually run into issues with one thread completing a unit of work at an inopportune time for the other. Could you look at adding some better support for multithreading? I think the best method would be implement something like TransactionScope (which uses thread storage). It would allow you to continue to use static methods on Repository but anything wrapped in the UnitOfWorkScope would have its own unit of work. |
|
|
The support is already in place. Units of work are either scoped per thread using TheadStatic or, in the case of a web app, per request through the HttpContext.Current.Items collection. Cheers, Andrew. |
|
|
Opps yeah you're right. I didn't see that attribute. Nevermind then :)
|
|