Remove UseConventionalHttpVerbs from controller creation options.

pull/112/head
Halil İbrahim Kalkan 8 years ago
parent ff4363dd61
commit 3a00fda900

@ -226,9 +226,7 @@ namespace Volo.Abp.AspNetCore.Mvc
protected virtual string SelectHttpMethod(ActionModel action, AbpControllerAssemblySetting configuration)
{
return configuration?.UseConventionalHttpVerbs == true
? HttpMethodHelper.GetConventionalVerbForMethodName(action.ActionName)
: HttpMethodHelper.DefaultHttpVerb;
return HttpMethodHelper.GetConventionalVerbForMethodName(action.ActionName);
}
protected virtual void NormalizeSelectorRoutes(string moduleName, string controllerName, ActionModel action)

@ -10,17 +10,14 @@ namespace Volo.Abp.AspNetCore.Mvc
public Assembly Assembly { get; }
public bool UseConventionalHttpVerbs { get; }
public Func<Type, bool> TypePredicate { get; set; }
public Action<ControllerModel> ControllerModelConfigurer { get; set; }
public AbpControllerAssemblySetting(string moduleName, Assembly assembly, bool useConventionalHttpVerbs)
public AbpControllerAssemblySetting(string moduleName, Assembly assembly)
{
ModuleName = moduleName;
Assembly = assembly;
UseConventionalHttpVerbs = useConventionalHttpVerbs;
TypePredicate = type => true;
ControllerModelConfigurer = controller => { };

@ -29,12 +29,9 @@ namespace Volo.Abp.AspNetCore.Mvc
};
}
public AbpControllerAssemblySettingBuilder CreateFor(
Assembly assembly,
string moduleName = ModuleApiDescriptionModel.DefaultServiceModuleName,
bool useConventionalHttpVerbs = true)
public AbpControllerAssemblySettingBuilder CreateFor(Assembly assembly, string moduleName = ModuleApiDescriptionModel.DefaultServiceModuleName)
{
var setting = new AbpControllerAssemblySetting(moduleName, assembly, useConventionalHttpVerbs);
var setting = new AbpControllerAssemblySetting(moduleName, assembly);
ControllerAssemblySettings.Add(setting);
return new AbpControllerAssemblySettingBuilder(setting);
}

Loading…
Cancel
Save