Base solution for your next web application
Open Closed

AutoRepositoryTypes dont working #3312


User avatar
0
liam1983 created

Hi,

I read the documentation and add my BaseRepository to my DbContext

[AutoRepositoryTypes(
        typeof(IRepository<>),
        typeof(IRepository<,>),
        typeof(CointoRepositoryBase<>),
        typeof(CointoRepositoryBase<,>))]
public class CointoDbContext : AbpZeroDbContext<Tenant, Role, User, CointoDbContext>

but after that my Tests failed with

Castle.MicroKernel.ComponentActivator.ComponentActivatorException : ComponentActivator: could not proxy Cointo.EntityFrameworkCore.Repositories.CointoRepositoryBase1[[Abp.Localization.ApplicationLanguage, Abp.Zero.Common, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null]] ---- Castle.DynamicProxy.InvalidProxyConstructorArgumentsException : Can not instantiate proxy of class: Cointo.EntityFrameworkCore.Repositories.CointoRepositoryBase1[[Abp.Localization.ApplicationLanguage, Abp.Zero.Common, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null]]. Could not find a parameterless constructor.

what can I do? Only add a parameterless ctor doesnt help me much


2 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Could it be same with <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/968">https://github.com/aspnetboilerplate/as ... issues/968</a> ?

    Thanks.

  • User Avatar
    0
    liam1983 created

    It would be he doesn't post the solution to this error....