Hi,
I'm trying to get a route with a From and To Dates in it without much success..
Anyway to test this out I've created the following test handler:
public class GetHandler
{
private readonly IUrlRegistry urlRegistry;
public GetHandler(IUrlRegistry urlRegistry)
{
this.urlRegistry = urlRegistry;
}
public string Execute(GetInputModel inputModel)
{
return urlRegistry.UrlFor( new ComplexRoute.GetInputModel { Id = 5, FromDate = DateTime.Now, ToDate = DateTime.Now.AddDays( 1 ) } );
}
}
This returns:
/complex-route/5/16/08/2012%2013%3A53%3A27/17/08/2012%2013%3A53%3A27
Which as you can see contains lots of / (slashes) so when you try and go to that route it won't work.
Is there a better way to work with Dates and routing in fubu?
Sorry for all the questions this week. Basically I'm leaving my current roll and I'm trying to clear up all the issues we've had with fubu, so the current company doesn't abandon it.
Tar
Dave