使用ABP连接SQLite时出现下面错误:
System.Data.Entity.Core.EntityException:“The underlying provider failed on Open.”
内部异常
ArgumentException: isolationLevel
找了好久才解决,记录一下。
1. 在Web和Ef项目中添加SQLite包

2.修改Web项目中的Web.config文件

添加 invariantName="System.Data.SQLite",type同invariantName="System.Data.SQLite.EF6"
数据库连接格式 <add name="Default" providerName="System.Data.SQLite.EF6" connectionString="Data Source=|DataDirectory|XXX.db;Pooling=True" />
3.修改Ef项目中事务隔离级别
未修改前报错:

修改如下:

主要是下面代码:
Configuration.UnitOfWork.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted;
在ABP中使用SQLite
标签:隔离级别 事务隔离级别 actions 数据库 .sql unit 事务 nbsp string
本文系统来源:http://www.cnblogs.com/bxtx/p/7896854.html
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!