Skip to content

Commit 887f5d1

Browse files
author
Musa Demir
committed
removes unused items. adds RuntimeCompilation reference
1 parent b0e3bfc commit 887f5d1

File tree

11 files changed

+17
-141
lines changed

11 files changed

+17
-141
lines changed

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/AbpCompanyName.AbpProjectName.Web.Mvc.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636

3737
<ItemGroup>
3838
<PackageReference Include="BuildBundlerMinifier" Version="3.2.435" />
39+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.1" />
3940
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.0">
4041
<PrivateAssets>all</PrivateAssets>
4142
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Startup/Startup.cs

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,20 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
3535
{
3636
// MVC
3737
services.AddControllersWithViews(
38-
options =>
39-
{
40-
options.Filters.Add(new AutoValidateAntiforgeryTokenAttribute());
41-
options.Filters.Add(new AbpAutoValidateAntiforgeryTokenAttribute());
42-
}
43-
).AddNewtonsoftJson(options =>
44-
{
45-
options.SerializerSettings.ContractResolver = new AbpMvcContractResolver(IocManager.Instance)
38+
options =>
39+
{
40+
options.Filters.Add(new AutoValidateAntiforgeryTokenAttribute());
41+
options.Filters.Add(new AbpAutoValidateAntiforgeryTokenAttribute());
42+
}
43+
)
44+
.AddRazorRuntimeCompilation()
45+
.AddNewtonsoftJson(options =>
4646
{
47-
NamingStrategy = new CamelCaseNamingStrategy()
48-
};
49-
});
47+
options.SerializerSettings.ContractResolver = new AbpMvcContractResolver(IocManager.Instance)
48+
{
49+
NamingStrategy = new CamelCaseNamingStrategy()
50+
};
51+
});
5052

5153
IdentityRegistrar.Register(services);
5254
AuthConfigurer.Configure(services, _appConfiguration);
@@ -82,10 +84,10 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerF
8284
app.UseRouting();
8385

8486
app.UseAuthentication();
85-
87+
8688
app.UseJwtTokenMiddleware();
87-
88-
app.UseAuthorization();
89+
90+
app.UseAuthorization();
8991

9092
app.UseEndpoints(endpoints =>
9193
{

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Views/Shared/Components/ControlSidebar/ControlSidebarViewComponent.cs

Lines changed: 0 additions & 18 deletions
This file was deleted.

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Views/Shared/Components/ControlSidebar/ControlSidebarViewModel.cs

Lines changed: 0 additions & 6 deletions
This file was deleted.

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Views/Shared/Components/ControlSidebar/Default.cshtml

Lines changed: 0 additions & 6 deletions
This file was deleted.

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Views/Shared/Layout/_Header.RightNavbar.Messages.cshtml

Lines changed: 0 additions & 51 deletions
This file was deleted.

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Views/Shared/Layout/_Header.RightNavbar.Notifications.cshtml

Lines changed: 0 additions & 26 deletions
This file was deleted.

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Views/Shared/Layout/_Header.RightNavbar.cshtml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,4 @@
33
<ul class="navbar-nav ml-auto">
44
@await Component.InvokeAsync(typeof(RightNavbarLanguageSwitchViewComponent))
55
@await Component.InvokeAsync(typeof(RightNavbarUserAreaViewComponent))
6-
@await Html.PartialAsync("_Header.RightNavbar.Messages.cshtml")
7-
@await Html.PartialAsync("_Header.RightNavbar.Notifications.cshtml")
8-
<li class="nav-item">
9-
<a class="nav-link" data-widget="control-sidebar" data-slide="true" href="#">
10-
<i class="fas fa-th-large"></i>
11-
</a>
12-
</li>
136
</ul>

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Views/Shared/Layout/_Header.SearchForm.cshtml

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<nav class="main-header navbar navbar-expand navbar-white navbar-light">
22
@await Html.PartialAsync("_Header.LeftNavbar.cshtml")
3-
@await Html.PartialAsync("_Header.SearchForm.cshtml")
43
@await Html.PartialAsync("_Header.RightNavbar.cshtml")
54
</nav>

0 commit comments

Comments
 (0)