I am new to openRasta framework. I have a resource called Project.I have 2 different types of GET to be done on this resource as i need different info on these two GETs.My configuration is like this
ResourceSpace.Has.ResourcesOfType<IList<Project>>()
.AtUri("/projects")
.And.AtUri("/miniprojects")
.HandledBy<ProjectHandler>()
.AsJsonDataContract()
.And.AsXmlDataContract();
and my methods in Handler are as below
[HttpOperation(HttpMethod.GET, ForUriName = "/projects")]
public OperationResult GetProjectsList()
{
}
[HttpOperation(HttpMethod.GET, ForUriName = "/miniprojects")]
public OperationResult GetMiniProjectList()
{
}
Whenever i am doing some GET on this resource, whatever my URL is for example http://localhost/projects or http://localhost/miniprojects) the very first method with GetXXX name in handler class gets called every time. When I changed the sequence of the GetXXX methods in handler file the other method gets called.
So my question is, does sequence of methods in Handler determines which GetXXX method to be called? Moreover, I specified different "ForUriName" in the HttpOperation attribute for each GetXXX method as mentioned in the snippet, but still the sequence took the precedence.
Can any one help me in resolving this issue? Or let me know if I am missing anything.
Thanks in advance.