Beispiel #1
0
        /// <summary>
        /// 使用属性名称的创建
        /// </summary>
        /// <param name="context">上下文</param>
        /// <param name="propertyName">属性名称</param>
        public ViewSetCache(ViewContext context, string propertyName)
        {
            _set = new ViewSet <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;
            }
        }
Beispiel #2
0
        /// <summary>
        /// 设置表名
        /// </summary>
        private void Init()
        {
            var name = CacheManger.GetTableMap(this.GetType()).ClassInfo.Name;

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