GetAsync()
{
diff --git a/templates/mvc-module/src/MyCompanyName.MyProjectName.HttpApi/MyProjectNameControllerBase.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.HttpApi/MyProjectNameController.cs
similarity index 66%
rename from templates/mvc-module/src/MyCompanyName.MyProjectName.HttpApi/MyProjectNameControllerBase.cs
rename to templates/mvc-module/src/MyCompanyName.MyProjectName.HttpApi/MyProjectNameController.cs
index f447b65456..1dd9a6c8b2 100644
--- a/templates/mvc-module/src/MyCompanyName.MyProjectName.HttpApi/MyProjectNameControllerBase.cs
+++ b/templates/mvc-module/src/MyCompanyName.MyProjectName.HttpApi/MyProjectNameController.cs
@@ -3,9 +3,9 @@ using Volo.Abp.AspNetCore.Mvc;
namespace MyCompanyName.MyProjectName
{
- public class MyProjectNameControllerBase : AbpController
+ public abstract class MyProjectNameController : AbpController
{
- public MyProjectNameControllerBase()
+ protected MyProjectNameController()
{
LocalizationResource = typeof(MyProjectNameResource);
}
diff --git a/templates/mvc-module/src/MyCompanyName.MyProjectName.HttpApi/Samples/SampleController.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.HttpApi/Samples/SampleController.cs
index 7c4de3b65e..1bf34c32c4 100644
--- a/templates/mvc-module/src/MyCompanyName.MyProjectName.HttpApi/Samples/SampleController.cs
+++ b/templates/mvc-module/src/MyCompanyName.MyProjectName.HttpApi/Samples/SampleController.cs
@@ -7,7 +7,7 @@ namespace MyCompanyName.MyProjectName.Samples
{
[RemoteService]
[Route("api/MyProjectName/sample")]
- public class SampleController : MyProjectNameControllerBase, ISampleAppService
+ public class SampleController : MyProjectNameController, ISampleAppService
{
private readonly ISampleAppService _sampleAppService;
diff --git a/templates/mvc-module/src/MyCompanyName.MyProjectName.Web/Pages/MyProjectName/Index.cshtml b/templates/mvc-module/src/MyCompanyName.MyProjectName.Web/Pages/MyProjectName/Index.cshtml
new file mode 100644
index 0000000000..0ef7562269
--- /dev/null
+++ b/templates/mvc-module/src/MyCompanyName.MyProjectName.Web/Pages/MyProjectName/Index.cshtml
@@ -0,0 +1,7 @@
+@page
+@inherits MyCompanyName.MyProjectName.Web.Pages.MyProjectNamePage
+@model MyCompanyName.MyProjectName.Web.Pages.MyProjectName.IndexModel
+@{
+}
+MyProjectName
+A sample page for the MyProjectName module.
\ No newline at end of file
diff --git a/templates/mvc-module/src/MyCompanyName.MyProjectName.Web/Pages/MyProjectName/Index.cshtml.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.Web/Pages/MyProjectName/Index.cshtml.cs
new file mode 100644
index 0000000000..a9c43a1c88
--- /dev/null
+++ b/templates/mvc-module/src/MyCompanyName.MyProjectName.Web/Pages/MyProjectName/Index.cshtml.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.RazorPages;
+
+namespace MyCompanyName.MyProjectName.Web.Pages.MyProjectName
+{
+ public class IndexModel : PageModel
+ {
+ public void OnGet()
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/templates/mvc-module/src/MyCompanyName.MyProjectName.Web/Pages/MyProjectNamePage.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.Web/Pages/MyProjectNamePage.cs
new file mode 100644
index 0000000000..5fe044221d
--- /dev/null
+++ b/templates/mvc-module/src/MyCompanyName.MyProjectName.Web/Pages/MyProjectNamePage.cs
@@ -0,0 +1,16 @@
+using Microsoft.AspNetCore.Mvc.Localization;
+using Microsoft.AspNetCore.Mvc.Razor.Internal;
+using MyCompanyName.MyProjectName.Localization;
+using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
+
+namespace MyCompanyName.MyProjectName.Web.Pages
+{
+ /* Inherit your UI Pages from this class. To do that, add this line to your Pages (.cshtml files under the Page folder):
+ * @inherits MyCompanyName.MyProjectName.Web.Pages.MyProjectNamePage
+ */
+ public abstract class MyProjectNamePage : AbpPage
+ {
+ [RazorInject]
+ public IHtmlLocalizer L { get; set; }
+ }
+}
diff --git a/templates/mvc-module/src/MyCompanyName.MyProjectName.Web/Pages/MyProjectNamePageModel.cs b/templates/mvc-module/src/MyCompanyName.MyProjectName.Web/Pages/MyProjectNamePageModel.cs
new file mode 100644
index 0000000000..d0b9c04a45
--- /dev/null
+++ b/templates/mvc-module/src/MyCompanyName.MyProjectName.Web/Pages/MyProjectNamePageModel.cs
@@ -0,0 +1,15 @@
+using MyCompanyName.MyProjectName.Localization;
+using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
+
+namespace MyCompanyName.MyProjectName.Web.Pages
+{
+ /* Inherit your PageModel classes from this class.
+ */
+ public abstract class MyProjectNamePageModel : AbpPageModel
+ {
+ protected MyProjectNamePageModel()
+ {
+ LocalizationResourceType = typeof(MyProjectNameResource);
+ }
+ }
+}
\ No newline at end of file