哇。。看看时间 真的很久很久没写博客了 将近一年了。
最近一直在忙各种家中事务和公司的新框架 终于抽出时间来更新一波了。
本篇主要讲一下关于Entity Framework Core访问oracle数据库的采坑。。
强调一下,本篇文章发布之前 关于Entity Framework Core访问oracle数据库的甲骨文官方dll还未正式发布。
不过我已经在项目中用起来了。。介意的兄弟可以先等等。。甲骨文说的是本年第三季度。。
1.官方文档中支持的环境
首先我们来看看所谓的官方支持吧。
操作系统:
1. Windows x64
1.1Windows 8.1 (Pro and Enterprise Editions)
1.2Windows 10 x64 (Pro, Enterprise, and Education Editions)
1.3Windows Server 2012 R2 x64 (Standard, Datacenter, Essentials, and FoundationEditions)
1.4Windows Server 2016 x64 (Standard and Datacenter Editions)
2.Linux x64
2.1Oracle Linux 7
2.2Red Hat Enterprise Linux 7
.NET版本:
1.NET Core 2.1 或者更高
2.NET Framework 4.6.1 或者更高
· Entity Framework Core版本:
1. 2.1版本或者更高
依赖库:
1. ODP.NET Core 18.3或者更高
2.Microsoft.EntityFrameworkCore.Relational 2.1或者更高
3.Access to Oracle Database 11g Release 2 (11.2) 或者更高
本篇将采取CodeFirst的形式来创建数据库。。
1.创建数据库
我们创建上下文与实体如下:
public class BloggingContext : DbContext { public DbSet<