Found more than one concrete type for given DbContext type (xxx.xxxx.xxx) define Multitenancysideattribute with Tenant

Source: Internet
Author: User

Error message:

Found more than one concrete type for given DbContext type (Abp.Zero.EntityFramework.AbpZeroCommonDbContext ' 2[ Easyman.authorization.roles.role,easyman.users.user]) define Multitenancysideattribute with Tenant. Found Types:Easyman.EntityFramework.EasymanDbContext, Easyman.entityframework, version=1.0.0.0, Culture=neutral, Publickeytoken=null, Easyman.EntityFramework.EmProjectDbContext, Em.Project.EntityFramework, version=1.0.0.0, Culture=neutral, Publickeytoken=null.

Error Origin: Find multiple dbcontext that satisfy the user's mapping

In my project, EF has multiple levels of inheritance, with the following inheritance structure:

 Public Abstract class Easymandbcontext:abpzerodbcontext<tenant, Role, user>publicclass Emprojectdbcontext: Easymandbcontext

here is a detail: the subclass Easymandbcontext that inherits Abpzerodbcontext should be set to abstract class abstract, on the grounds that the abstraction class will not be instantiated

Found more than one concrete type for given DbContext type (xxx.xxxx.xxx) define Multitenancysideattribute with Tenant

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.