Hi Kyle,
i moved the IUserRepository to app.Data but the error didnt go .. so i
looked into the container after it has been filled and found that it
contains the following types:
{app.Web.Controllers.HomeController}
{app.Web.Controllers.Security.UsersController}
{SharpArch.Core.PersistenceSupport.IEntityDuplicateChecker}
{SharpArch.Core.PersistenceSupport.IRepository`1[T]}
{SharpArch.Core.PersistenceSupport.NHibernate.INHibernateRepository`1
[T]}
{SharpArch.Core.PersistenceSupport.IRepositoryWithTypedId`2[T,IdT]}
{SharpArch.Core.PersistenceSupport.NHibernate.INHibernateRepositoryWithTypedId`2
[T,IdT]}
{app.Data.NHibernateMaps.Conventions.ReferenceConvention}
{app.Data.NHibernateMaps.AutoPersistenceModelGenerator}
{app.Data.NHibernateMaps.Conventions.PrimaryKeyConvention}
{app.Data.NHibernateMaps.Conventions.HasManyConvention}
{app.Data.NHibernateMaps.Conventions.TableNameConvention}
{SharpArch.Core.CommonValidator.IValidator}
so i decided to register it manually with the following line of code
in the componentregistrar's static method "AddComponentsTo"
container.AddComponent("userrepository",
typeof(IUserRepository), typeof( UserRepository));
that fixed it !
thank you all guys for your help, really appreciated.
On Aug 29, 4:26 pm, Kyle Baley <
k...@baley.org> wrote:
> The ComponentRegistrar is where I'd start looking. Step through it (which
> will be cumbersome because it's called in the global.asax.cs) and after the
> components are all registered, take a look at the container and see what's
> included in it.
>
> That said, there's a namespace issue somewhere. Your controller is looking
> for an IUserRepository from ApplicationServices, not Domain. If I recall,
> nothing from ApplicationServices is added to the container by default. Try
> deleting the IUserRepository from ApplicationServices and have your
> controller take the dependency from the IUserRepository in Domain.
>