is it any kind of attribute routing for which area attribute keyword is used along with controller ?
does it mean only user with admin role can access home controller ?
[Area("Admin")]
public class HomeController : Controller
{
// GET: /
public IActionResult Index()
{
return View();
}
public IActionResult Details()
{
return View();
}
}
i got the above code from this url http://www.dotnetfunda.com/articles/show/3390/using-area-in-aspnet-core
so if i understand correctly then it means Area attribute allow to change the url? am i right ?
when we create area folder in project then it would mandatory to use area attribute on controller or action method ?
when we create area folder in project then it would mandatory to use area attribute on controller or action method ?
see these url which talking about area
https://www.codeproject.com/Articles/714356/Areas-in-ASP-NET-MVC
http://www.dotnettricks.com/learn/mvc/mvc-areas-with-example
the above url show how to work with area but they never use [Area("Admin")] in code.
so still it is not clear when to use [Area("Admin")] in code.
please make this area more clear for me. thanks
Posted Apr 20, 2017, 6:21 PM
Hemant JoshiPosted Apr 20, 2017, 1:15 PM
Nilesh ShahPosted Apr 20, 2017, 11:48 AM