Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Route with Dates

Date: Thu, 16 Aug 2012 05:54:14 -0700 (PDT)
From: Dave <craftyfe...@gmail.com>
To: fubumvc-devel@googlegroups.com
Message-Id: <3b761d9b-b03a-40e4-a5a6-3d6aac25caae@googlegroups.com>
Subject: Route with Dates
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1017_12019840.1345121654730"

------=_Part_1017_12019840.1345121654730
Content-Type: multipart/alternative; 
	boundary="----=_Part_1018_19782676.1345121654730"

------=_Part_1018_19782676.1345121654730
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

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


------=_Part_1018_19782676.1345121654730
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hi,<div><br></div><div>I'm trying to get a route with a From and To Dates i=
n it without much success..</div><div><br></div><div>Anyway to test this ou=
t I've created the following test handler:</div><div><br></div><div><div>pu=
blic class GetHandler</div><div>{</div><div>&nbsp; &nbsp; private readonly =
IUrlRegistry urlRegistry;</div><div><br></div><div>&nbsp; &nbsp; public Get=
Handler(IUrlRegistry urlRegistry)</div><div>&nbsp; &nbsp; {</div><div>&nbsp=
; &nbsp; &nbsp; &nbsp; this.urlRegistry =3D urlRegistry;</div><div>&nbsp; &=
nbsp; }</div><div><br></div><div>&nbsp; &nbsp; public string Execute(GetInp=
utModel inputModel)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp=
; &nbsp; return urlRegistry.UrlFor( new ComplexRoute.GetInputModel { Id =3D=
 5, FromDate =3D DateTime.Now, ToDate =3D DateTime.Now.AddDays( 1 ) } );</d=
iv><div>&nbsp; &nbsp; }</div><div>}</div></div><div><br></div><div>This ret=
urns:</div><div><br></div><div><pre style=3D"color: rgb(0, 0, 0); word-wrap=
: break-word; white-space: pre-wrap; ">/complex-route/5/16/08/2012%2013%3A5=
3%3A27/17/08/2012%2013%3A53%3A27</pre><pre style=3D"color: rgb(0, 0, 0); wo=
rd-wrap: break-word; white-space: pre-wrap; "><br></pre><pre style=3D"color=
: rgb(0, 0, 0); word-wrap: break-word; white-space: pre-wrap; ">Which as yo=
u can see contains lots of / (slashes) so when you try and go to that route=
 it won't work.</pre><pre style=3D"color: rgb(0, 0, 0); word-wrap: break-wo=
rd; white-space: pre-wrap; "><br></pre><pre style=3D"color: rgb(0, 0, 0); w=
ord-wrap: break-word; white-space: pre-wrap; ">Is there a better way to wor=
k with Dates and routing in fubu?</pre><pre style=3D"color: rgb(0, 0, 0); w=
ord-wrap: break-word; white-space: pre-wrap; "><br></pre><pre style=3D"word=
-wrap: break-word; "><font color=3D"#000000"><span style=3D"white-space: pr=
e-wrap;">Sorry for all the questions this week. Basically I'm leaving my cu=
rrent roll and I'm trying to clear up all the issues we've had with fubu, s=
o the current company doesn't abandon it.</span></font></pre><pre style=3D"=
word-wrap: break-word; "><font color=3D"#000000"><span style=3D"white-space=
: pre-wrap;"><br></span></font></pre><pre style=3D"word-wrap: break-word; "=
><font color=3D"#000000"><span style=3D"white-space: pre-wrap;">Tar</span><=
/font></pre><pre style=3D"word-wrap: break-word; "><font color=3D"#000000">=
<span style=3D"white-space: pre-wrap;">
Dave</span></font></pre></div>
------=_Part_1018_19782676.1345121654730--

------=_Part_1017_12019840.1345121654730--