在实体框架中使用Transaction时出错 [英] Error while using Transaction in entity framwork

查看:101
本文介绍了在实体框架中使用Transaction时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我使用实体框架交易来插入和更新多个表中的数据。

它适用于小数据,但在数据量巨大时抛出跟随错误:



System.Data.EntityException:底层提供程序在Open上失败。 ---> System.Transactions.TransactionException:该操作对事务的状态无效。在System.Transactions



请建议一些解决方案。



谢谢,



问候,

Ashish

Hi,

I am using entity framework Transaction for inserting and updating data in multiple tables.
It works fine for the small data but throw following error when data is huge:

System.Data.EntityException: The underlying provider failed on Open. ---> System.Transactions.TransactionException: The operation is not valid for the state of the transaction. at System.Transactions

Please suggest some solution of it.

Thank you,

Regards,
Ashish

推荐答案

如果连接出现此异常字符串不合适。请检查连接字符串。

谢谢

:)
This exception arises if the connection strings are not proper. Please check the connection strings.
Thanks
:)


这篇关于在实体框架中使用Transaction时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆