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

  var t = CardtypeBizCom.GetInstance().GetModelByPK(421);
            var t2 = Mapper.Map<Cardtype, Cardtype>(t);//id没被过滤
          
            
            //copyObject(t, t2); 
            t2.Cardtypename = "4444";
            CardtypeBizCom.GetInstance().Add(t2)

 

posted @ 2015-09-18 08:36  awp110  阅读(119)  评论(0编辑  收藏  举报