protected void Page_Load(object sender, EventArgs e) { var authorid = Convert.ToInt32(Request.QueryString["authorid"]); var fkAuthorId = (EntityField2)EntityFieldFactory.Create("PostEntity", "FkAuthorId"); var parameter = new EntityDataSourceParameterBase { PathsFunc = path2 => path2.Add(PostEntity.PrefetchPathCategory1CollectionViaCategory1Post), FiltersFunc = filters => filters.Add(fkAuthorId == authorid) }; using (var ds = new EntityDataSourceBase<PostEntity, EntityDataSourceParameterBase>()) { var entities = ds.GetEntities(parameter); rpt.DataSource = entities; } rpt.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { var authorid = Convert.ToInt32(Request.QueryString["authorid"]); var fkAuthorId = (EntityField2)EntityFieldFactory.Create("PostEntity", "FkAuthorId"); var parameter = new EntityDataSourceParameterBase { PathsFunc = path2 => path2.Add(PostEntity.PrefetchPathCategory1CollectionViaCategory1Post), FiltersFunc = filters => filters.Add(fkAuthorId == authorid) }; using (var ds = new EntityDataSourceBase <PostEntity, EntityDataSourceParameterBase>()) { var entities = ds.GetEntities(parameter); rpt.DataSource = entities; } rpt.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { var parameter = new EntityDataSourceParameterBase { ItemsToReturn = 0, PathsFunc = paths => { var c2 = Category1Entity.PrefetchPathCategory2.WithMaxNumberOfItems(2); c2.SubPath.Add(Category2Entity.PrefetchPathPostCollectionViaCategory2Post.WithMaxNumberOfItems(20)); paths.Add(c2); }, //FiltersFunc = filters => filters.Add(fkAuthorId == authorid) }; using (var ds = new EntityDataSourceBase <Category1Entity, EntityDataSourceParameterBase>()) { var entities = ds.GetEntities(parameter); rpt.DataSource = entities; } rpt.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { var parameter = new EntityDataSourceParameterBase { ItemsToReturn = 0, PathsFunc = paths => { var c2 = Category1Entity.PrefetchPathCategory2.WithMaxNumberOfItems(2); c2.SubPath.Add(Category2Entity.PrefetchPathPostCollectionViaCategory2Post.WithMaxNumberOfItems(20)); paths.Add(c2); }, //FiltersFunc = filters => filters.Add(fkAuthorId == authorid) }; using (var ds = new EntityDataSourceBase<Category1Entity, EntityDataSourceParameterBase>()) { var entities = ds.GetEntities(parameter); rpt.DataSource = entities; } rpt.DataBind(); }