void IDbEntitySetInternal.MakeReadOnly() { if (valuesLoaded) { foreignKeys = null; columns = null; setParent = null; db = null; } }
private void InitDb() { var dbConfiguration = GlobalDbConfiguration.GetConfigurationOrEmpty(typeof(TMember)); if (dbConfiguration.GetDbForEvilLazyLoad != null) { db = dbConfiguration.GetDbForEvilLazyLoad(); } else { throw new LazyLoadUnattachedEntityException("Lazy loading on a newly created entity which was not loaded from database is not allowed!"); } }
internal void Init( IDb db, bool isForeignKey, Func <long?>[] foreignKeys, string[] columns, Action <TMember, DbEntity> setParent, DbEntity parent, bool lazyLoadValues, Action <TMember> beforeRightsCheckAction, Action <TMember> afterRightsCheckAction) { this.columns = columns; this.isForeignKey = isForeignKey; this.parent = parent; this.setParent = setParent; this.db = (IDbInternal)db; this.foreignKeys = foreignKeys; this.lazyLoadValues = lazyLoadValues; this.beforeRightsCheckAction = beforeRightsCheckAction; this.afterRightsCheckAction = afterRightsCheckAction; }
void IDbEntityInternal.SetDb(IDbInternal db) => _db = db;
void IDbEntitySetInternal.SetDb(BaseDb db) => this.db = db;
protected void Init(IDb db, bool isForeignKey, string[] idColumnNames) { this.isForeignKey = isForeignKey; this.idColumnNames = idColumnNames; this.db = (IDbInternal)db; }
internal MultipleResultSetReader(DbSqlCommand sqlCommand, IDbInternal db) { this.sqlCommand = sqlCommand; this.db = db; }