Esempio n. 1
0
        /// <summary>
        /// 使用属性名称的创建
        /// </summary>
        /// <param name="context">上下文</param>
        /// <param name="propertyName">属性名称</param>
        public TableSetCache(TableContext context, string propertyName)
        {
            _set = new TableSet <TEntity>(context, propertyName);

            var keyValue = _set._context.ContextMap.GetState(this.GetType(), propertyName);

            if (keyValue.Key != null)
            {
                _set.SetState = keyValue.Value; _set.Name = _set.SetState.SetAtt.Name;
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 设置表名
        /// </summary>
        private void Init()
        {
            var name = CacheManger.GetTableMap(this.GetType()).ClassInfo.Name;

            Set = new TableSet <TVo>(this, name);
        }