- Thu Jun 01, 2017 11:02 am
#19275
Hi,
I read the documentation and add my BaseRepository to my DbContext
but after that my Tests failed with
Castle.MicroKernel.ComponentActivator.ComponentActivatorException : ComponentActivator: could not proxy Cointo.EntityFrameworkCore.Repositories.CointoRepositoryBase`1[[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.CointoRepositoryBase`1[[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
I read the documentation and add my BaseRepository to my DbContext
Code: Select all
[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.CointoRepositoryBase`1[[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.CointoRepositoryBase`1[[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