Skip to content

Commit

Permalink
Update WebApplicationModule.cs
Browse files Browse the repository at this point in the history
配置DefaultWrapResultAttribute
  • Loading branch information
PuzzledAlien committed Jul 17, 2019
1 parent d1211d3 commit 55cca53
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
using Abp.AspNetCore;
using Abp.AspNetCore.Configuration;
using Abp.Modules;
using Abp.Reflection.Extensions;
using Abp.Web.Models;

namespace WebApplication1
{
[DependsOn(typeof(AbpAspNetCoreModule))]
public class WebApplicationModule : AbpModule
{
public override void PreInitialize()
{
var result = new DontWrapResultAttribute();
Configuration.Modules.AbpAspNetCore().DefaultWrapResultAttribute.WrapOnError = result.WrapOnError;
Configuration.Modules.AbpAspNetCore().DefaultWrapResultAttribute.WrapOnSuccess = result.WrapOnSuccess;
}

public override void Initialize()
{
IocManager.RegisterAssemblyByConvention(typeof(WebApplicationModule).GetAssembly());
Expand Down

0 comments on commit 55cca53

Please sign in to comment.