public CachedSqlSelect<Photo> ChildPhotos(Q where, params KeyValuePair<object, OrderBy.OrderDirection>[] orderBy) { PhotoTableDef def = new PhotoTableDef(); TagPhotoTableDef def2 = new TagPhotoTableDef(); return new CachedSqlSelect<Photo>( new LinkedChildren<Photo> ( TablesEnum.Tag, this.K, TablesEnum.Photo, def.TableCacheKey, dr => { Photo newPhoto = new Photo(); newPhoto.Initialise(dr); return newPhoto; }, where, orderBy, TablesEnum.TagPhoto, def2.TableCacheKey ) ); }
public CachedSqlSelect<Tag> ChildTags(Q where, params KeyValuePair<object, OrderBy.OrderDirection>[] orderBy) { TagTableDef def = new TagTableDef(); TagPhotoTableDef def2 = new TagPhotoTableDef(); return new CachedSqlSelect<Tag>( new LinkedChildren<Tag> ( TablesEnum.Photo, this.K, TablesEnum.Tag, def.TableCacheKey, dr => { Tag newTag = new Tag(); newTag.Initialise(dr); return newTag; }, where, orderBy, TablesEnum.TagPhoto, def2.TableCacheKey ) ); }