예제 #1
0
파일: P.cs 프로젝트: zhuwansu/Rafy
        private static ListProperty <TEntityList> RegisterListExtensionCore <TEntityList>(string propertyName, Type declareType, ListPropertyMeta args)
            where TEntityList : EntityList
        {
            var meta = new ListPropertyMetadata <TEntityList>(args.DataProvider);

            var property = new ListProperty <TEntityList>(typeof(TEntity), declareType, propertyName, meta);

            property._hasManyType = args.HasManyType;

            ManagedPropertyRepository.Instance.RegisterProperty(property);

            return(property);
        }
예제 #2
0
 /// <summary>
 /// 延迟加载子对象的集合。
 /// </summary>
 /// <typeparam name="TCollection">子对象集合类型</typeparam>
 /// <param name="propertyInfo">当前属性的元信息</param>
 /// <returns></returns>
 protected TCollection GetLazyList <TCollection>(ListProperty <TCollection> propertyInfo)
     where TCollection : EntityList
 {
     return(this.LoadLazyList(propertyInfo) as TCollection);
 }