当前位置:Gxlcms > 数据库问题 > abp 连接oracle数据库

abp 连接oracle数据库

时间:2021-07-01 10:21:17 帮助过:33人阅读

override void OnModelCreating(DbModelBuilder modelBuilder) { modelBuilder.HasDefaultSchema("ORCL");//一定要大写 base.OnModelCreating(modelBuilder); }

4.修改**Web 下的web.config  

<oracle.manageddataaccess.client>
    <version number="*">
      <dataSources>
        <dataSource alias="ORCL" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) " />
      </dataSources>
    </version>
  </oracle.manageddataaccess.client>
 <connectionStrings>   
    <add name="Default" providerName="Oracle.ManagedDataAccess.Client" connectionString="User Id=ORCL;Password=ORCL;Data Source=ORCL;Persist Security Info=true " />
  </connectionStrings>

5.程序包管理控制台

 5.1默认项目选项 选择**EntityFramework

 5.2 执行Add-Migration 命令

 5.3 执行update-database命令

注:遇到的一个坑,没做好上述步骤之前,执行了nuget命令 ,导致 生成了sqlerver的资源文件,所以一直报 没有dbo用户的错

 

abp 连接oracle数据库

标签:res   default   .config   ring   class   conf   number   uil   entity   

人气教程排行