I've the mentioned code in my project.
public class CmsUrlConstraint : IRouteConstraint
{
public bool Match(HttpContextBase httpContext, Route route, string parameterName, RouteValueDictionary values, RouteDirection routeDirection)
{
var cms = new BrainSmith.Models.HireDevelopersTemplate();
var url = values.Values.FirstOrDefault();
string RouteName = cms.GetHireTemplateUrl(url.ToString()).Tables[0].Rows[0]["RoutingURL"].ToString();
var categories = new[] { RouteName };
if (values[parameterName] == null)
{
return false;
}
var category = values[parameterName].ToString();
return categories.Any(x =>x==category);
}
}
Here I want to return multiple values in categories and GetHireTemplateUrl is called in another class file to select RoutingURL and TemplateId from Stored Procedure ,
I only want to get RoutingURL and TemplateId both returns at a time ...
Please suggest best answer for it.