Dispose后访问的DataContext

Dispose后访问的DataContext

本文介绍了System.ObjectDisposedException:无法访问已处置的对象。对象名称:'Dispose后访问的DataContext。'。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 您好, 我有一个使用LINQ数据上下文的可执行流程( LINQ to SQL)。出于某种原因,每当我在另一个批处理过程中执行该过程时,我都会在主题行中收到错误。这种情况发生在调用DataContext.GetTable< TENtity>()。 有没有其他人经历过这种情况?同样,当我直接运行它时,该过程有效,当我批量运行它时,但是当我尝试通过另一个.NET程序运行它时,它失败了。 谢谢。解决方案 Hello, I have an executable process using a LINQ data context (LINQ to SQL).  For some reason, whenever I execute the process in another batch process, I'm getting the error in the subject line.  This occurs to the call DataContext.GetTable<TENtity>(). Has anybody else experienced this?  Again, the process works when I run it directly, and when I run it in batch, but when I try to run it through another .NET program, it fails. Thanks. 解决方案 这篇关于System.ObjectDisposedException:无法访问已处置的对象。对象名称:'Dispose后访问的DataContext。'。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-31 09:40