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
|
I am currently working on developing an Web API using the newly released MVC Web API architecture and I have a question you may be able to help me with. For normal MVC / Web Form development I would use the PerRequestUnitOfWorkScope and it has served me well for some time. This uses under the hood HttpContext.Current to manage the lifecycle of the unit of work but I am reading for Web API HttpContext shouldn't be used and all request managed objects need to retained in the HttpRequestMessage property bag. Before I go and look at writing a PerRequestMessageUnitOfWorkScope do you have one already developed and an example of it's usage because I am interested how you got over the fact that there isn't a HttpRequestMessage.Current senario. Thanks, Jim |
|
|
Hi Jim, No we dont have anything already developed but is the scope of the UnitOfWork only going to be during the action call itself? If so you could just use a specifically scoped UnitOfWork rather than worrying about an extended scope e.g.
If you do end up developing something and would be happy to share it with others please post the details here :)
|
|