コード例 #1
0
ファイル: DataBase.cs プロジェクト: GiladBaruchian/ShopSmart
 /// <summary>
 /// Initializes a new instance of the <see cref="BusinessLogics"/> class.
 /// </summary>
 public DataBase()
 {
     //Initializing the DAL
     this._db = new ShopSmartEntities();
     //we will have to detect and save changes manually
     this._db.Configuration.AutoDetectChangesEnabled = true;
     this._db.Configuration.LazyLoadingEnabled = true;
     this._db.Configuration.ProxyCreationEnabled = true;
     this._db.Configuration.ValidateOnSaveEnabled= true;
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BusinessLogics"/> class.
 /// </summary>
 public DataBase()
 {
     //Initializing the DAL
     this._db = new ShopSmartEntities();
     //we will have to detect and save changes manually
     this._db.Configuration.AutoDetectChangesEnabled = false;
     this._db.Configuration.LazyLoadingEnabled       = true;
     this._db.Configuration.ProxyCreationEnabled     = true;
     this._db.Configuration.ValidateOnSaveEnabled    = true;
 }