Base solution for your next web application
Open Closed

Creating ApplicationService class in new project #5012


User avatar
0
thor created

Hi,

When I create a new XXXAppService class and inherit from the initial MyProjectAppServiceBase and IApplicationService everything works fine - - IF the class is located in the MyProject.Application project, but not if I create it in MyNewProject. Why is that?

I am guessing this has to do with the way DI has been implemented. Is there a way to force DI to identify AppServices in other projects?


2 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @thor,

    You need to create a module class in your new project, see <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Module-System">https://aspnetboilerplate.com/Pages/Doc ... ule-System</a>. Then, add it as a dependency to your main web module.

    Something like this;

    [DependsOn(typeof(YourNewPRojectModule))]
    public class YourMainWebModule : AbpModule
    {
    .....
    }
    
  • User Avatar
    0
    thor created

    OK, thank you for the help!