Recently, I started over with the ABP project generator in order to excise ABPZero from my solution. I created a brand new solution and added all my files back. Something went wrong and now my repositories won't work because of the following runtime error. What does it mean?
An unhandled exception of type 'Castle.MicroKernel.ComponentNotFoundException' occurred in Castle.Windsor.dll
Additional information: No component for supporting the service Scorecard.EntityFramework.ScorecardDbContext was found
5 Answer(s)
-
0
Hi,
Did you derived ScorecardDbContext from AbpZeroDbContext?
-
0
BTW, "Additional information: No component for supporting the service Scorecard.EntityFramework.ScorecardDbContext was found" means that ScorecardDbContext is not registered to Dependency Injection. Normally, if it's derived from AbpZeroDbContext then it's automatically registered (since AbpZeroDbContext implements ITransientDependency). See document for more information and understand dependency injection better: <a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents/Dependency-Injection">http://www.aspnetboilerplate.com/Pages/ ... -Injection</a>
-
0
Somehow I was inheriting from DbContext. Once I switched to AbpDbContext my repositories were happy.
-
0
If you're using module-zero then inherit from AbpZeroDbContext, not AbpDbContext. Have a nice day.
-
0
Not using module-zero. It doesn't support my company org structure.