这是我的前缀属性 public class farmsController : ApiController/news/farms/{farmId}?version={Version} [HttpDelete, Route("{farmId}?version={Version}", Name = "Deletefarm")]The route template canno
我有一个简单的action和一个GET操作,定义如下:public class MyController : ApiController [HttpGet] public object Get(Guid id1, Guid id2) return new object();}http://localhost/api/My/dd0d728-ae3d-4129-8a81-b0cdbcfd17
我认为在网络上进行简单的搜索结果不仅仅是这样。但是ASP.NET Web 2呢?HttpConfiguration config = new HttpConfiguration();
// config.MapHttpAttributeRoutes(); // This doesn't work. I guess there is needed some more plumbing to know what Controllers to search for attributes, but I'm lost h
问题是,System.Web.Mvc.RouteAttribute是密封的,我不能扩展它。// compiler: GETAttribute cannot derive from sealed class RouteAttribute有没有办法配置框架来查找我的自定义属性路由,或者我必须重构和/或找到一种手动注册这些路由的方法?