我正在使用 ASP.NET Boilerplate 框架来做一个小项目,我使用 Swagger UI 集成来检查项目中的 API。我注意到Get和GetAll仍在使用 POST 方法,而其他方法则在各自的 HTTP 动词中,例如Create是 POST、Edit是 UPDATE 等......我阅读了文档并尝试了他们在 [文档] ( https:// aspnetboilerplate.com/Pages/Documents/Dynamic-Web-API#http-verbs )

编辑 1:代码UserAppServiceClass
[AbpAuthorize(PermissionNames.Pages_Users)]
public class UserAppService : AsyncCrudAppService<User, UserDto, long, PagedResultRequestDto, CreateUserDto, UpdateUserDto>, IUserAppService
{
private readonly UserManager _userManager;
private readonly RoleManager _roleManager;
private readonly IRepository<Role> _roleRepository;
public UserAppService(
IRepository<User, long> repository,
UserManager userManager,
IRepository<Role> roleRepository,
RoleManager roleManager)
: base(repository)
{
_userManager = userManager;
_roleRepository = roleRepository;
_roleManager = roleManager; …Run Code Online (Sandbox Code Playgroud)