Found more than one concrete type for given DbContext Type (xxx.xxxx.xxx) define MultiTenancySideAttribute with Tenant
2017-08-08 11:14
696 查看
错误提示:
错误原由:找到满足User的映射的多个DbContext
我的项目中,EF有多级继承,继承结构如下:
此处有一个细节处理:应该将继承AbpZeroDbContext的子类EasymanDbContext 设置为抽象类abstract,理由是抽象类不会被实例化
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.
错误原由:找到满足User的映射的多个DbContext
我的项目中,EF有多级继承,继承结构如下:
public abstract class EasymanDbContext : AbpZeroDbContext<Tenant, Role, User> public class EmProjectDbContext: EasymanDbContext
此处有一个细节处理:应该将继承AbpZeroDbContext的子类EasymanDbContext 设置为抽象类abstract,理由是抽象类不会被实例化
相关文章推荐
- 【错误】More than one row with the given identifier was found: 1, for class:
- HibernateException:More than one row with the given identifier was found: 1, for class....
- more than one row with the given identifier was found
- org.hibernate.HibernateException: More than one row with the given identifier was found: 116, for cl
- Hibernate 级联查询: More than one row with the given identifier was found 报错
- More than one row with the given identifier was found 问题
- Cannot create TypedQuery for query with more than one return using requested result type
- Hibernate:More than one row with the given identifier was found解决办法
- android异常 More than one file was found with OS independent path 'META-INF/XXX'
- Hibernate:More than one row with the given identifier was found解决办法
- Android studio more than one library with package name 'xxx.xxx.mylibrary'
- java.lang.IllegalArgumentException: No converter found for return value of type: class XXX.XXXX
- Error: Found item Attr/font more than one time Error: Execution failed for task
- Flex中TypeError: Error #1089: Assignment to lists with more than one item is not supported.
- ASP.Net MVC Entity Framework Error – More than one context type was found in the assembly ‘ProjectNa
- More than one file was found with OS independent path 'META-INF/DEPENDENCIES'
- More than one file was found with OS independent path
- 调用Cython时报错: More than one filename match found for utility code Capsule
- More than one file was found with OS independent path 'META-INF/DEPENDENCIES'
- No qualifying bean of type 'javax.sql.DataSource' available: more than one 'primary' bean found