-1
The path to creating an Area no longer appears in . net core 3.1
Path: Project > Right Click > Add > Area
-1
The path to creating an Area no longer appears in . net core 3.1
Path: Project > Right Click > Add > Area
1
According to the framework documentation, to create an area you need:
[Area("nome da área")]
Example of structure
Project name
Areas
Products
Controllers
ManageController.cs
Views
Home
Index.cshtml
Manage
Index.cshtml
Example of controller
[Area("Products")]
public class ManageController : Controller
{
Setup on startup
app.UseEndpoints(endpoints =>
{
endpoints.MapControllerRoute(
name: "Products",
pattern: "{area:exists}/{controller=Home}/{action=Index}/{id?}");
endpoints.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
});
-3
Project > Add > New Scaffolded Item > MVC Area
Browser other questions tagged mvc .net-core
You are not signed in. Login or sign up in order to post.
Were you able to verify the answer? Do not forget to accept it if you are satisfied with it.
– tvdias