Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how can i use auto api start with [BasicAspNetCoreApplication] template? #274

Open
HuiJiOnGit opened this issue Jul 20, 2024 · 0 comments
Open

Comments

@HuiJiOnGit
Copy link

I'm using the [BasicAspNetCoreApplication] template to get started, but I want to use it in conjunction with [Auto Api] in this template,

I added the following code, but it doesn't seem to take effect

AppModule

public override void ConfigureServices(ServiceConfigurationContext context)
{
     Configure<AbpAspNetCoreMvcOptions>(options =>
     {
          options.ConventionalControllers.Create(typeof(AppModule).Assembly);
     });
}

and i add a TestAppService in root path

public class TestAppService : ApplicationService
{
    [HttpGet]
    public int Get()
    {
        return 0;
    }

    [HttpPost]
    public int Post()
    {
        return 0;
    }

    [HttpPut]
    public int Put()
    {
        return 0;
    }

    [HttpDelete]
    public int Delete()
    {
        return 0;
    }
}

Here are my dependence, what else do I need to do?

  <ItemGroup>
    <PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
    <PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="7.2.2" />
    <PackageReference Include="Volo.Abp.Autofac" Version="7.2.2" />
  </ItemGroup>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant