Just discovered ServiceStack last months and i really enjoy working with this great framework. Was reaaly fed up with WCF settings and static method prototyping !
I have a question !
I have created a class : Events that allows to display one or a List of Events using following Routes :
[Route("/events")]
[Route("/events/{Id}")]
public class Event
{
public ushort Id { get; set; }
public string FromDate { get; set; }
public string ToDate { get; set; }
}
But i would also like to list events between 2 dates using kind of same routes. Actually the route only takes Id as parameter but i wanted to add another route specifying FromDate : I thought something like this would work : /events/01-01-2012/10-01-2012 in order to get all events between 2 dates but it does not work.
Is it possible to define routes that allows to define different routes based on different parameters (taken from DTO) ?
I am newbie with managing Routes and would really like to know how it's possible to define different way of filtering based on different parameters.
Thanks for the help ! Awesome work Demis !