错误提示:

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,理由是抽象类不会被实例化

Found more than one concrete type for given DbContext Type (xxx.xxxx.xxx) define MultiTenancySideAttribute with Tenant的更多相关文章

  1. 统计分析中Type I Error与Type II Error的区别

    统计分析中Type I Error与Type II Error的区别 在统计分析中,经常提到Type I Error和Type II Error.他们的基本概念是什么?有什么区别? 下面的表格显示 b ...

  2. Informatica 错误:Cannot convert from SQL type 93 to C type 4

    经验和积累蛮重要!向大神学习! ---------------------------------------------------------------------- Mapping: 在sou ...

  3. orcle自定义类型type/create or replace type

    一.type / create or repalce type 区别联系 相同: 可用关键字create type 或者直接用type定义自定义类型, 区别: create type 变量 as ta ...

  4. org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'null' to required type 'double' for property 'band'; nested exception is org.springframework.core.convert.Con

    本文为博主原创,未经允许不得转载: 先将异常粘贴出来: 20:37:26,909 ERROR [com.suning.fucdn.controller.ProductDataStaticsContro ...

  5. Unable to cast object of type 'System.Int32' to type 'System.Array'.

    x 入职了新公司.最近比较忙...一看博客...更新频率明显少了...罪过罪过... 新公司用ASP.NET MVC 遇上一个错误: Unable to cast object of type 'Sy ...

  6. Host does not support domain type kvm for virtualization type 'hvm' arch 'x86_64'

    kvm创建虚拟机报错: qemu-img create -f qcow2 /tmp/centos.qcow2 10G virt-install --virt-type kvm --name cento ...

  7. 定制 input[type="radio"] 和 input[type="checkbox"] 样式

    表单中,经常会使用到单选按钮和复选框,但是,input[type="radio"] 和 input[type="checkbox"] 的默认样式在不同的浏览器或 ...

  8. 修改 input[type="radio"] 和 input[type="checkbox"] 的默认样式

    表单中,经常会使用到单选按钮和复选框,但是,input[type="radio"] 和 input[type="checkbox"] 的默认样式在不同的浏览器或 ...

  9. 编译binutil包报错 error: array type has incomplete element type extern const struct relax_type md_relax_table[];

    安装lfs时编译binutils出错: ../../sources/binutils-2.15.91.0.2/gas/config/tc-i386.h:457:32: error: array typ ...

随机推荐

  1. python-组合模式

    源码地址:https://github.com/weilanhanf/PythonDesignPatterns 说明: 组合模式主要用来处理一类具有“容器特征”的对象——它们即充当对象又可以作为容器包 ...

  2. git基础使用——TortoiseGit

    一.初识git Git是一个开源的分布式版本控制系统,用于敏捷高效地处理任何或小或大的项目. Git 是 Linus Torvalds 为了帮助管理 Linux 内核开发而开发的一个开放源码的版本控制 ...

  3. hadoop完全分布式的安装

    下载地址: centos 7.5 下载地址 清华 http://mirrors.tuna.tsinghua.edu.cn/centos/7/isos/x86_64/CentOS-7-x86_64-DV ...

  4. maven学习笔记--window平台下的安装和一些基本的配置

    maven官网:http://maven.apache.org/ 系统要求如下: 安装及配置步骤 (1)下载:到Maven 的官网上去下载windows版本的Maven的安装包!下载对应的zip 格式 ...

  5. 从零自学Java-6.使用循环重复执行操作

    1.使用for循环: 2.使用while循环: 3.使用do-while循环: 4.提早退出循环(break,continue): 5.为循环命名. 程序Nines:显示1-200的整数与9的乘积 p ...

  6. 【SPL标准库专题(6)】 Datastructures:SplPriorityQueue

    普通的队列是一种先进先出的数据结构,元素在队列尾追加,而从队列头取出.在优先队列中,元素被赋予优先级.当访问元素时,具有最高优先级的元素最先取出.优先队列具有最高级先出 (largest-in,fir ...

  7. php编译安装 报错 make ***[libphp5.la] Error 1解决方法

    报错信息: /usr/bin/ld: cannot find -lltdl collect2: ld returned 1 exit status make: *** [libphp5.la] Err ...

  8. 使用 Azure PowerShell 管理 Azure 虚拟网络和 Windows 虚拟机

    Azure 虚拟机使用 Azure 网络进行内部和外部网络通信. 本教程介绍了如何在虚拟网络中创建多个虚拟机 (VM),以及如何在虚拟机之间配置网络连接. 你将学习如何执行以下操作: 创建虚拟网络 创 ...

  9. shell脚本常用技巧

    shell脚本常用技巧 1.获取随机字符串或数字 ~]#echo $RANDOM | md5sum | cut -c 1-6 ~]#openssl rand -base64 4 | cut -c 1- ...

  10. SQL 时间戳转换为日期

    , '1970-01-01 00:00:00') 其中Timestamp为10位的时间戳,+8*3600是获取中国北京时间(东八区)