public static IUrlNamedLocation GetLocationByUrlSegment(this ILocationQuery locationQuery, Country country, string segment, string suffix) { var locationUrlName = GetUrlName(segment, suffix); return(locationUrlName != null ? locationQuery.ResolveUrlNamedLocation(country, locationUrlName) : null); }
public override object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) { var locationUrlName = GetLocationUrlName(bindingContext); return(locationUrlName != null ? _locationQuery.ResolveUrlNamedLocation(ActivityContext.Current.Location.Country, locationUrlName) : null); }