c# - 使用交易范围和查询

标签 c# database visual-studio oracle entity-framework

我正在将 Entity Framework 与 Oracle 数据库一起使用。我尝试使用事务范围(因为我想要回滚选项):

using (TransactionScope ts = new TransactionScope())
{
      .....
}

问题是,当我尝试在 using 语句中查询时,抛出了一个异常:

无法加载 DLL“oramts.dll”:找不到指定的模块。 (HRESULT 异常:0x8007007E)

我该如何解决这个问题?

最佳答案

安装 Oracle 客户端连接软件时,Oramts.dll 文件未作为默认安装包含在内。 我认为您必须安装 Oracle Services for Microsoft Transaction Server 才能使用 TransactionScope。

关于c# - 使用交易范围和查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3297388/

相关文章:

c# - 如何显示 "current user"的数据?

c++ - Visual Studio : project is not up to date "because "AlwaysCreate"was specified"?

c# - 将自定义 CSS 应用于 ASP.NET 中的 Crystal Reports

c# - DataGridView 不显示最近插入的行

database - 在带有 hsql : Where is the database file 的 Liferay 中

sql - 基础表的特权是否自动传递给在该表上创建的任何 View ?

visual-studio-2010 - 将现有服务引用文件夹包含到 Visual Studio 2010 中的项目中

c# - 如何使用mysql命令条件语句在 Crystal 报表中显示数据?

c# - RxUI ObservableAsPropertyHelper 不适用于 XAML 绑定(bind)

sql - 如何编写脚本来查找 SQL Server 数据库对象(如 storedproc 和 View )中使用的数据库?