This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class AutofacConfig | |
| { | |
| public static void Register() | |
| { | |
| var builder = new ContainerBuilder(); | |
| var assembly = Assembly.GetExecutingAssembly(); | |
| builder.RegisterModelBinders(assembly); | |
| builder.RegisterModelBinderProvider(); | |
| //builder.RegisterHubs(assembly); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class RouteConfig | |
| { | |
| public static void RegisterRoutes(RouteCollection routes) | |
| { | |
| routes.LowercaseUrls = true; | |
| routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); | |
| routes.IgnoreRoute("{resource}.ashx/{*pathInfo}"); | |
| routes.MapMvcAttributeRoutes(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static class WebApiConfig | |
| { | |
| public static void Register(HttpConfiguration config) | |
| { | |
| config.MapHttpAttributeRoutes(); | |
| config.Routes.MapHttpRoute( | |
| name: "DefaultApi", | |
| routeTemplate: "api/{controller}/{id}", | |
| defaults: new { id = RouteParameter.Optional } |
NewerOlder