EF在单例模式及C/S方式开发时,操作数据对象以后如果发生异常,要做善后工作。

try{

删除或修改

}catch

{

_DBContext.Refresh(RefreshMode.StoreWins, entity);

}

posted @ 2013-11-14 16:21  赤狐(zcm123)  阅读(339)  评论(0编辑  收藏  举报