代码改变世界

随笔档案-2012年12月

A different object with the same identifier value was already associated with the session

2012-12-13 23:22 by Fred-Xu, 2154 阅读, 收藏,
摘要: 这个错误非常诡异,把我搞死了要,查阅了很多资料,找到了Merge这个方法,那么开始改造代码:IRepository接口添加Merge方法: bool Add(TEntity entity); bool Add(IEnumerable<TEntity> items); bool Update(TEntity entity); bool Delete(TEntity entity); bool Delete(IEnumerable<TEntity> entities); object Merge(TEntity e... 阅读全文