public ControllerBase() { if (OrmUtil.CheckCacheFlag <T>()) { DbSession.RegisterCacheTable(TableName, true); } EntityProxy <T> entityProxy = EntityProxyManager.Instance.GetEntityProxy <T>(); foreach (PropertySchema item in entityProxy.GetPropertyList()) { if (item.PropertyType.IsEnum) { Dictionary <string, string> dict = new Dictionary <string, string>(); foreach (object enumItem in Enum.GetValues(item.PropertyType)) { long l = Convert.ToInt64(enumItem); dict.Add(l.ToString(), enumItem.ToString()); } DataMapping.Instance.Add(item.PropertyType.ToString(), dict); } } }