Beispiel #1
0
        public void BindProperty <T>(OnPropertyBind onPropertyBind, OnIdentityBind onIdentityBind, OnComponentBind onComponentBind)
            where T : class, new()
        {
            ClassMap <T> classMap = Loader.GetClassMap <T>();

            if (onPropertyBind != null)
            {
                foreach (PropertyMap map in classMap.Properties)
                {
                    onPropertyBind(map);
                }
            }

            if (onIdentityBind != null && classMap.Identity != null)
            {
                onIdentityBind(classMap.Identity);
            }

            if (onComponentBind != null)
            {
                MapComponent(classMap, onComponentBind, classMap.Components);
            }
        }
Beispiel #2
0
        public String GetTable <T>() where T : class, new()
        {
            ClassMap <T> classMap = Loader.GetClassMap <T>();

            return(classMap.GetTableName());
        }