首页 > 代码库 > MVC+EF6+Oracle,提示ORA-01918: user '***' does not exist

MVC+EF6+Oracle,提示ORA-01918: user '***' does not exist

1、在上下文里重载OnModelCreating:
        //没用到这个方法 
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.HasDefaultSchema("这里写你的Oracle用户名,一定要大写噢!");
        }

MVC+EF6+Oracle,提示ORA-01918: user '***' does not exist