Rhino Commons UnitOfWork and ASP.NET MVC Controller seem to be caching parameters -


I am using Rhino Commons Unitoffers in my controlling methods. The first request retrieves data and displays it correctly. My problem is that when I change the parameters in the URL, they do not go to the controller values ​​are used from the previous request.

My Controller Method is given below:

  Public Action List (Int Year, Int. Month, Int Day) {ILIST & Lt; Meeting & gt; Meetings; (Using Unitoffers. Start ()) {meetings = _meetingRepository.GetByDate (year, month, day); } View return ("list", meetings); }  

Gives all the meetings for the initial request 2009 for global .asax.cs

~ / meetings / 2009 received from the UnitofWorker Application. Returns all meetings for the next request ~ / meetings / 2007 year 2009.

This visual studio is coming during debugging, I have not had the chance to go to IIS to see that there is only one problem.

Am I doing something wrong in using the unitofwork, or can it be a problem somewhere else?

My guess is that the whole unit of the work is a red herring ... the controller values ​​from previous requests Is being crossed as the same example of the controller is being reused for many requests. The ASP.NET MVC framework works under the assumption that each request is controlled from a fresh example of the controller.

So, with this in mind, how are you building your controllers? For example, if you are using an IoC framework like Spring.NET, make sure your controllers are not singletons.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -