/// <summary>
 /// 创建CloseAutoDetectChangeContext的实例
 /// </summary>
 /// <param name="wrap">AutoDetectChangeContextWrap实例</param>
 /// <returns></wrap>
 public static void ForceDetectChange(this AutoDetectChangeContextWrap wrap, object entity)
 {
     wrap.ServiceData.BaseData.BaseDB.BaseDataContext.Entry(entity).State = EntityState.Modified;
 }
 public CloseAutoDetectChangeContext(AutoDetectChangeContextWrap wrap)
 {
     _wrap = wrap;
     _wrap.ServiceData.BaseData.BaseDB.BaseDataContext.Configuration.AutoDetectChangesEnabled = true;
 }
 /// <summary>
 /// 创建CloseAutoDetectChangeContext的实例
 /// </summary>
 /// <param name="wrap">AutoDetectChangeContextWrap实例</param>
 /// <returns></wrap>
 public static CloseAutoDetectChangeContext InstanceCloseAutoDetectChangeContext(this AutoDetectChangeContextWrap wrap)
 {
     return(new CloseAutoDetectChangeContext(wrap));
 }