Hello, I created new entity in the core, and created also map, service....I am following procedure explained here http://www.lateshtclick.com/blogpost/how-to-add-new-tables-to-nopcommerce
I have also external plugin (SevenSpike) and updated Nop.Framework too (dependency)
How can I use the new service in ProductService ? Is it possible ?
Hello, I created new entity in the core, and created also map, service....I am following procedure explained here http://www.lateshtclick.com/blogpost/how-to-add-new-tables-to-nopcommerce
I have also external plugin (SevenSpike) and updated Nop.Framework too (dependency)
How can I use the new service in ProductService ? Is it possible ?
Thanks Francesco
Add your new service as a constructor parameter for the ProductService and register your service with Autofac.
I added in the ProductService constructor new service I created. What do you mean register with Autofac ? I added it in the DependencyRegistrar in Nop.Framework, is it enough?
When I start application I receive error from SevenSpikes.Nop.Plugins.AnywhereSliders: is not able to find constructor for new service.
I added in the ProductService constructor new service I created. What do you mean register with Autofac ? I added it in the DependencyRegistrar in Nop.Framework, is it enough?
When I start application I receive error from SevenSpikes.Nop.Plugins.AnywhereSliders: is not able to find constructor for new service.
Francesco
Yes add to DependencyRegistrar (it uses Autofac ioc).
Maybe..I ll check, but why if I use IRepository<MyEntity> instead of service in ProductService constructor works fine? should I receive same error?
If the problem is with MyEntity AND MyEntity is a dependency for both, then yes, it would be reasonable to think you would receive the same or similar error.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.