File tree Expand file tree Collapse file tree
aspnetcore/mvc/controllers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ title: Areas in ASP.NET Core
33author : rick-anderson
44description : Learn how Areas are an ASP.NET MVC feature used to organize related functionality into a group as a separate namespace (for routing) and folder structure (for views).
55ms.author : riande
6- ms.date : 12/05 /2019
6+ ms.date : 03/21 /2019
77uid : mvc/controllers/areas
88---
99# Areas in ASP.NET Core
Original file line number Diff line number Diff line change 11using Microsoft . AspNetCore . Mvc ;
2+ using Microsoft . Docs . Samples ;
23
34namespace MVCareas . Areas . Products . Controllers
45{
@@ -7,13 +8,13 @@ public class HomeController : Controller
78 {
89 public IActionResult Index ( )
910 {
10- ViewData [ "routeInfo" ] = ControllerContext . ToCtxString ( ) ;
11+ ViewData [ "routeInfo" ] = ControllerContext . MyDisplayRouteInfo ( ) ;
1112 return View ( ) ;
1213 }
1314
1415 public IActionResult About ( )
1516 {
16- ViewData [ "routeInfo" ] = ControllerContext . ToCtxString ( ) ;
17+ ViewData [ "routeInfo" ] = ControllerContext . MyDisplayRouteInfo ( ) ;
1718 return View ( ) ;
1819 }
1920 }
Original file line number Diff line number Diff line change 11#region snippet
22using Microsoft . AspNetCore . Mvc ;
3+ using Microsoft . Docs . Samples ;
34
45namespace MVCareas . Areas . Products . Controllers
56{
@@ -10,13 +11,13 @@ public class ManageController : Controller
1011 #endregion
1112 public IActionResult Index ( )
1213 {
13- ViewData [ "routeInfo" ] = ControllerContext . ToCtxString ( ) ;
14+ ViewData [ "routeInfo" ] = ControllerContext . MyDisplayRouteInfo ( ) ;
1415 return View ( ) ;
1516 }
1617
1718 public IActionResult About ( )
1819 {
19- ViewData [ "routeInfo" ] = ControllerContext . ToCtxString ( ) ;
20+ ViewData [ "routeInfo" ] = ControllerContext . MyDisplayRouteInfo ( ) ;
2021 return View ( ) ;
2122 }
2223 }
Original file line number Diff line number Diff line change 11using Microsoft . AspNetCore . Mvc ;
2+ using Microsoft . Docs . Samples ;
23
34namespace MVCareas . Areas . Services . Controllers
45{
@@ -8,13 +9,13 @@ public class HomeController : Controller
89 {
910 public IActionResult Index ( )
1011 {
11- ViewData [ "routeInfo" ] = ControllerContext . ToCtxString ( ) ;
12+ ViewData [ "routeInfo" ] = ControllerContext . MyDisplayRouteInfo ( ) ;
1213 return View ( ) ;
1314 }
1415
1516 public IActionResult About ( )
1617 {
17- ViewData [ "routeInfo" ] = ControllerContext . ToCtxString ( ) ;
18+ ViewData [ "routeInfo" ] = ControllerContext . MyDisplayRouteInfo ( ) ;
1819 return View ( ) ;
1920 }
2021 }
Original file line number Diff line number Diff line change 11using Microsoft . AspNetCore . Mvc ;
22using MVCareas . Models ;
33using System . Diagnostics ;
4+ using Microsoft . Docs . Samples ;
45
56namespace MVCareas . Controllers
67{
78 public class HomeController : Controller
89 {
910 public IActionResult Index ( )
1011 {
11- ViewData [ "routeInfo" ] = ControllerContext . ToCtxString ( ) ;
12+ ViewData [ "routeInfo" ] = ControllerContext . MyDisplayRouteInfo ( ) ;
1213 return View ( ) ;
1314 }
1415
1516 public IActionResult Privacy ( )
1617 {
17- ViewData [ "routeInfo" ] = ControllerContext . ToCtxString ( ) ;
18+ ViewData [ "routeInfo" ] = ControllerContext . MyDisplayRouteInfo ( ) ;
1819 return View ( ) ;
1920 }
2021
2122 public IActionResult About ( )
2223 {
23- ViewData [ "routeInfo" ] = ControllerContext . ToCtxString ( ) ;
24+ ViewData [ "routeInfo" ] = ControllerContext . MyDisplayRouteInfo ( ) ;
2425 return View ( ) ;
2526 }
2627
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- <Project Sdk =" Microsoft.NET.Sdk.Web" >
1+ <Project Sdk =" Microsoft.NET.Sdk.Web" >
22
33 <PropertyGroup >
44 <TargetFramework >netcoreapp3.1</TargetFramework >
55 </PropertyGroup >
66
7+ <ItemGroup >
8+ <Folder Include =" Extensions\" />
9+ </ItemGroup >
10+
11+ <ItemGroup >
12+ <PackageReference Include =" Rick.Docs.Samples.RouteInfo" Version =" 1.0.*" />
13+ </ItemGroup >
14+
715</Project >
You can’t perform that action at this time.
0 commit comments