Base solution for your next web application
Open Closed

AbpException: There is no such an entity with given primary #1219


User avatar
0
vnetonline created

Dear Support

I have just downloaded a new template of AspNetZero and i am getting the below error.

Can you please help?

Server Error in '/' Application.

There is no such an entity with given primary key. Entity type: [CompanyName].[ProjectName].MultiTenancy.Tenant, primary key: 2

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Abp.AbpException: There is no such an entity with given primary key. Entity type: [CompanyName].[ProjectName].MultiTenancy.Tenant, primary key: 2

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[AbpException: There is no such an entity with given primary key. Entity type: [CompanyName].[ProjectName].MultiTenancy.Tenant, primary key: 2] Abp.Domain.Repositories.AbpRepositoryBase2.Get(TPrimaryKey id) +237 Castle.Proxies.EfRepositoryBase2Proxy_2.Get_callback(Int32 id) +4 Castle.Proxies.Invocations.AbpRepositoryBase`2_Get_9.InvokeMethodOnTarget() +66 Castle.DynamicProxy.AbstractInvocation.Proceed() +86 Abp.Domain.Uow.UnitOfWorkInterceptor.PerformSyncUow(IInvocation invocation, UnitOfWorkOptions options) +49 Abp.Domain.Uow.UnitOfWorkInterceptor.PerformUow(IInvocation invocation, UnitOfWorkOptions options) +73


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

    Hi,

    When do you get this error ? As soon as run the application or in a specific case ? Can you also check your database that AbpTenants table has a record with id=2.