Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Sessi
1.
2. Routes public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = "" } // Parameter defaults ); } protected void Application_Start() { RegisterRoutes(RouteTable.Routes); }
3. Route definition Example of matching URL {controller}/{action}/{id} /Products/show/beverages {table}/Details.aspx /Products/Details.aspx blog/{action}/{entry} /blog/show/123 {reporttype}/{year}/{month}/{day} /sales/2008/1/5 {locale}/{action} /US/show {language}-{country}/{action} /en-US/show
4.
5. Action Results Name Framework Behavior Producing Method ContentResult Writes a string value directly into the HTTP response. Content EmptyResult Does not write to the HTTP response. FileContentResult Takes the contents of a file (represented as an array of bytes) and write the contents into the HTTP response. File FilePathResult Takes the contents of a file at the given location and writes the contents into the HTTP response. File FileStreamResult Takes a file stream produced by the controller and writes the stream into the HTTP response. File HttpUnauthorizedResult A special result used by authorization filters when authorization checks fail. JavaScriptResult Responds to the client with a script for the client to execute. JavaScript JsonResult Responds to the client with data in JavaScript Object Notation (JSON). Json RedirectResult Redirects the client to a new URL. Redirect RedirectToRouteResult Renders the specified view to respond with an HTML fragment (typically used in AJAX scenarios). RedirectToRoute / RedirectToAction PartialViewResult Renders the specified view to respond with an HTML fragment (typically used in AJAX scenarios). PartialView ViewResult Renders the specified view and responds to the client with HTML. View
6. Custom Filters public class LogAttribute : ActionFilterAttribute { public override void OnActionExecuting(ActionExecutingContext filterContext) { Log("Action Executing", filterContext.RouteData); } public override void OnActionExecuted(ActionExecutedContext filterContext) { Log("Action Executed", filterContext.RouteData); } public override void OnResultExecuting(ResultExecutingContext filterContext) { Log("Result Executing", filterContext.RouteData); } public override void OnResultExecuted(ResultExecutedContext filterContext) { Log("Result Executed", filterContext.RouteData); }