Exemple #1
0
        /*static EntityPool()
         * {
         *   var entityPoolType = typeof(TSelfReferenceType);
         *   var attributes = entityPoolType.GetCustomAttributes(false).Where(x => x is DataBaseAttribute);
         *   if (attributes.Any())
         *   {
         *       var dBAttribute = (DataBaseAttribute)attributes.FirstOrDefault();
         *       NativeSql = IntrospectionManager.GetSqlHelperByKey(dBAttribute.Key);
         *   }
         *   else
         *   {
         *       throw new ClassNotHaveDataBaseAttributeException(entityPoolType.Name);
         *   }
         * }  */

        public EntityPool()
        {
            Key = IntrospectionManager.GetDbKey(GetType().FullName);
            if (string.IsNullOrWhiteSpace(Key) && Configure.SetKey != null)
            {
                Key = Configure.SetKey.Invoke(this);
            }
        }