Пример #1
0
        public TableMapping(Type type)
        {
            this.MappedType = type;

            this.TableName            = OrmHelper.GetTableName(this.MappedType);
            this.OldTableName         = OrmHelper.GetOldTableName(this.MappedType);
            this.OnPrimaryKeyConflict = OrmHelper.GetOnPrimaryKeyConflict(this.MappedType);
            this._properties          = OrmHelper.GetProperties(this.MappedType);
            this.Columns     = this._properties.Select(x => new Column(x)).ToList();
            this.Checks      = OrmHelper.GetChecks(this.MappedType);
            this.ForeignKeys = OrmHelper.GetForeignKeys(this._properties);
            this.Indexes     = OrmHelper.GetIndexes(this.MappedType, this._properties);

            this.Virtual   = OrmHelper.GetVirtual(this.MappedType);
            this.Tokenizer = OrmHelper.GetTokenizer(this.MappedType);
        }
Пример #2
0
        public TableMapping(Type type)
        {
            MappedType = type;

            TableName            = OrmHelper.GetTableName(MappedType);
            OldTableName         = OrmHelper.GetOldTableName(MappedType);
            OnPrimaryKeyConflict = OrmHelper.GetOnPrimaryKeyConflict(MappedType);
            _properties          = OrmHelper.GetProperties(this.MappedType);
            Columns     = _properties.Select(x => new Column(x)).ToList();
            Checks      = OrmHelper.GetChecks(this.MappedType);
            ForeignKeys = OrmHelper.GetForeignKeys(_properties);
            Indexes     = OrmHelper.GetIndexes(MappedType, _properties);

            Virtual   = OrmHelper.GetVirtual(MappedType);
            Tokenizer = OrmHelper.GetTokenizer(MappedType);
        }