Update nuget packages, code cleanup for MVC template.

pull/1128/head
Halil ibrahim Kalkan 7 years ago
parent a740e4a2a5
commit a67e982d42

@ -1,7 +1,7 @@
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Components;
using Volo.Abp.DependencyInjection;
namespace MyCompanyName.MyProjectName.Branding
namespace MyCompanyName.MyProjectName
{
[Dependency(ReplaceServices = true)]
public class MyProjectNameBrandingProvider : DefaultBrandingProvider

@ -6,7 +6,7 @@ namespace MyCompanyName.MyProjectName
{
public MyProjectNameWebAutoMapperProfile()
{
//Configure your AutoMapper mapping configuration here...
//Define your AutoMapper configuration here...
}
}
}

@ -1,5 +1,4 @@
using System.IO;
using System.Linq;
using Localization.Resources.AbpUi;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
@ -7,7 +6,6 @@ using Microsoft.Extensions.DependencyInjection;
using MyCompanyName.MyProjectName.EntityFrameworkCore;
using MyCompanyName.MyProjectName.Localization.MyProjectName;
using MyCompanyName.MyProjectName.Menus;
using MyCompanyName.MyProjectName.Permissions;
using Swashbuckle.AspNetCore.Swagger;
using Volo.Abp;
using Volo.Abp.Account.Web;
@ -17,21 +15,17 @@ using Volo.Abp.AspNetCore.Mvc.UI;
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Autofac;
using Volo.Abp.AutoMapper;
using Volo.Abp.Data;
using Volo.Abp.Identity;
using Volo.Abp.Identity.Web;
using Volo.Abp.Localization;
using Volo.Abp.Localization.Resources.AbpValidation;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.Web;
using Volo.Abp.Threading;
using Volo.Abp.UI;
using Volo.Abp.UI.Navigation;
using Volo.Abp.VirtualFileSystem;
using Volo.Abp.PermissionManagement;
using Volo.Abp.TenantManagement.Web;
//<TEMPLATE-REMOVE IF-NOT='EntityFrameworkCore'>
using Volo.Abp.EntityFrameworkCore;
@ -91,6 +85,11 @@ namespace MyCompanyName.MyProjectName
{
Configure<AbpAutoMapperOptions>(options =>
{
/* use `true` for the `validate` parameter if you want to
* validate the profile on application startup.
* See http://docs.automapper.org/en/stable/Configuration-validation.html for more
* about configuration validation.
*/
options.AddProfile<MyProjectNameWebAutoMapperProfile>();
});
}
@ -123,7 +122,6 @@ namespace MyCompanyName.MyProjectName
options.Resources
.Get<MyProjectNameResource>()
.AddBaseTypes(
typeof(AbpValidationResource),
typeof(AbpUiResource)
);
@ -155,10 +153,11 @@ namespace MyCompanyName.MyProjectName
services.AddSwaggerGen(
options =>
{
options.SwaggerDoc("v1", new Info { Title = "MyProjectName API", Version = "v1" });
options.SwaggerDoc("v1", new Info {Title = "MyProjectName API", Version = "v1"});
options.DocInclusionPredicate((docName, description) => true);
options.CustomSchemaIds(type => type.FullName);
});
}
);
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)

@ -14,6 +14,6 @@
<p><a abp-button="Primary" href="/Account/Login"><i class="fa fa-sign-in"></i> @L["Login"]</a></p>
}
<hr/>
<p class="text-right"><a href="http://abp.io?ref=tmpl" target="_blank">abp.io</a></p>
<p class="text-right"><a href="https://abp.io?ref=tmpl" target="_blank">abp.io</a></p>
</abp-card-body>
</abp-card>

@ -11,7 +11,11 @@ namespace MyCompanyName.MyProjectName
public static int Main(string[] args)
{
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Debug() //TODO: Should be configurable!
#if DEBUG
.MinimumLevel.Debug()
#else
.MinimumLevel.Information()
#endif
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.Enrich.FromLogContext()
.WriteTo.File("Logs/logs.txt")

@ -1,3 +1,4 @@
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling

@ -1,6 +0,0 @@
[
{
"outputFile": "wwwroot/pages/index.css",
"inputFile": "wwwroot/pages/index.scss"
}
]

@ -1,49 +0,0 @@
{
"compilers": {
"less": {
"autoPrefix": "",
"cssComb": "none",
"ieCompat": true,
"strictMath": false,
"strictUnits": false,
"relativeUrls": true,
"rootPath": "",
"sourceMapRoot": "",
"sourceMapBasePath": "",
"sourceMap": false
},
"sass": {
"includePath": "",
"indentType": "space",
"indentWidth": 2,
"outputStyle": "nested",
"Precision": 5,
"relativeUrls": true,
"sourceMapRoot": "",
"sourceMap": false
},
"stylus": {
"sourceMap": false
},
"babel": {
"sourceMap": false
},
"coffeescript": {
"bare": false,
"runtimeMode": "node",
"sourceMap": false
}
},
"minifiers": {
"css": {
"enabled": true,
"termSemicolons": true,
"gzip": false
},
"javascript": {
"enabled": true,
"termSemicolons": true,
"gzip": false
}
}
}

@ -1,6 +1,6 @@
{
"version": "0.1.0",
"name": "MyCompanyName.MyProjectName",
"version": "1.0.0",
"name": "my-app",
"private": true,
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.basic": "^0.4.9"

@ -15,13 +15,13 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="NSubstitute" Version="3.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.0" />
<PackageReference Include="NSubstitute" Version="4.1.0" />
<PackageReference Include="Shouldly" Version="3.0.2" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.extensibility.execution" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="2.2.0" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="2.2.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.4" />
</ItemGroup>

@ -14,7 +14,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.0" />
<ProjectReference Include="..\MyCompanyName.MyProjectName.Application.Tests\MyCompanyName.MyProjectName.Application.Tests.csproj" />
<ProjectReference Include="..\..\src\MyCompanyName.MyProjectName.Web\MyCompanyName.MyProjectName.Web.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AspNetCore.TestBase\Volo.Abp.AspNetCore.TestBase.csproj" />

Loading…
Cancel
Save