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)
-
0
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
-
0
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.