示例#1
0
		public CachedSqlSelect<Photo> ChildFavouritePhotos(Q where, params KeyValuePair<object, OrderBy.OrderDirection>[] orderBy)
		{
			PhotoTableDef def = new PhotoTableDef();
			UsrPhotoFavouriteTableDef def2 = new UsrPhotoFavouriteTableDef();
			return new CachedSqlSelect<Photo>(
				new LinkedChildren<Photo>
				(
					TablesEnum.Usr,
					this.K,
					TablesEnum.Photo,
					def.TableCacheKey,
					dr =>
					{
						Photo newPhoto = new Photo();
						newPhoto.Initialise(dr);
						return newPhoto;
					},
					where,
					orderBy,
					TablesEnum.UsrPhotoFavourite,
					def2.TableCacheKey
				)
			);
		}