摘要:
private EntityCollection<T> ToEntityCollection<T>(this List<T> list) where T : class { EntityCollection<T> entityCollection = new EntityCollection<T>(); list.ForEach(entityCollection.Add); return enti 阅读全文
posted @ 2019-10-28 10:27
hofmann
阅读(1828)
评论(1)
推荐(0)
摘要:
该对象上下文实例已被释放,不能用于需要连接的操作。 shared context per request模式,缩短Entity实例的存在时间和降低Entity实例的共享性,并考虑性能,因为Entity需要手动Dispose。 不能使用单例模式,静态方法就可以。 阅读全文
posted @ 2019-10-28 09:56
hofmann
阅读(406)
评论(0)
推荐(0)

浙公网安备 33010602011771号