I am using Rhino Commons UnitOfWork in my controller methods. The first request retrieves the data and displays it correctly. My problem is when I change the parameters in the URL they are not passed to the controller. The values from the previous request are used.
My controller method is listed below:
public ActionResult List(int year, int? month, int? day)
{
IList<Meeting> meetings;
using (UnitOfWork.Start()) {
meetings = _meetingRepository.GetByDate(year, month, day);
}
return View("List", meetings);
}
The Global.asax.cs inherits from UnitOfWorkApplication
The initial request to ~/meetings/2009 returns all meetings for the year 2009. The next request to ~/meetings/2007 returns all meetings for the year 2009.
This is occuring while debugging in Visual Studio. I have not had a chance to move to IIS to see if the same problem occurs.
Am I doing something wrong in my use of UnitOfWork, or could it be a problem somewhere else?