コード例 #1
0
 void IDbEntitySetInternal.MakeReadOnly()
 {
     if (valuesLoaded)
     {
         foreignKeys = null;
         columns     = null;
         setParent   = null;
         db          = null;
     }
 }
コード例 #2
0
        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!");
            }
        }
コード例 #3
0
 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;
 }
コード例 #4
0
 void IDbEntityInternal.SetDb(IDbInternal db) => _db = db;
コード例 #5
0
 void IDbEntitySetInternal.SetDb(BaseDb db) => this.db = db;
コード例 #6
0
 protected void Init(IDb db, bool isForeignKey, string[] idColumnNames)
 {
     this.isForeignKey  = isForeignKey;
     this.idColumnNames = idColumnNames;
     this.db            = (IDbInternal)db;
 }
コード例 #7
0
 internal MultipleResultSetReader(DbSqlCommand sqlCommand, IDbInternal db)
 {
     this.sqlCommand = sqlCommand;
     this.db         = db;
 }