Base solution for your next web application
Open Closed

dependencies #275


User avatar
0
razy69 created

hi, im trying to use boilerplate framework in my projct. but i have some error like this:

**Can't create component 'MetaJoin.Inventory.UOM.UOMsAppService' as it has dependencies to be satisfied.

'MetaJoin.Inventory.UOM.UOMsAppService' is waiting for the following dependencies:

  • Service 'MetaJoin.Inventory.Repositories.IUomRepository' which was not registered.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Castle.MicroKernel.Handlers.HandlerException: Can't create component 'MetaJoin.Inventory.UOM.UOMsAppService' as it has dependencies to be satisfied.

'MetaJoin.Inventory.UOM.UOMsAppService' is waiting for the following dependencies:

  • Service 'MetaJoin.Inventory.Repositories.IUomRepository' which was not registered.**

how can i fix this problem?? please help me. tanks.


2 Answer(s)
  • User Avatar
    0
    daws created

    Injection was not correctly done.

    Read this document : <a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents/Dependency-Injection">http://www.aspnetboilerplate.com/Pages/ ... -Injection</a>

    be sure that your AppService is deriving from IApplicationService if it's a normal class, you could use ITransientDependency (or singleton) if your repository depends on a db, derive your context from AbpDbContext

  • User Avatar
    0
    hikalkan created
    Support Team

    Thanks a lot @daws :) In addition, IUomRepository is a custom repository. Have you derived it from IRepository and created a class named UomRepository that implements IUomRepository? You can share your codes for more help.