RouteConfig.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.Mvc;
  6. using System.Web.Routing;
  7. namespace GreenTree.Nachtragsmanagement.Web
  8. {
  9. public class RouteConfig
  10. {
  11. public static void RegisterRoutes(RouteCollection routes)
  12. {
  13. routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  14. routes.IgnoreRoute("{resource}.ashx/{*pathInfo}");
  15. routes.MapRoute(
  16. name: "Default",
  17. url: "{controller}/{action}/{id}",
  18. defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
  19. );
  20. routes.MapRoute(
  21. "GreenTree.Nachtragsmanagement.Web.Administration.Users",
  22. "admin/viewusers",
  23. new
  24. {
  25. controller = "Admin",
  26. action = "ViewUsers"
  27. },
  28. new[]
  29. {
  30. "GreenTree.Nachtragsmanagement.Web.Controllers"
  31. }
  32. );
  33. routes.MapRoute(
  34. "GreenTree.Nachtragsmanagement.Web.Administration.Roles",
  35. "admin/viewroles",
  36. new
  37. {
  38. controller = "Admin",
  39. action = "ViewRoles"
  40. },
  41. new[]
  42. {
  43. "GreenTree.Nachtragsmanagement.Web.Controllers"
  44. }
  45. );
  46. routes.MapRoute(
  47. "GreenTree.Nachtragsmanagement.Web.Administration.Plugins",
  48. "admin/viewplugins",
  49. new
  50. {
  51. controller = "Admin",
  52. action = "ViewPlugins"
  53. },
  54. new[]
  55. {
  56. "GreenTree.Nachtragsmanagement.Web.Controllers"
  57. }
  58. );
  59. }
  60. }
  61. }