private void DataPortal_Fetch(Paging page) { using (var ctx = ContextManager <EFDataContext> .GetManager(Database.EFramework)) { var i = (from p in ctx.DataContext.FI_PBudExpItem select FI_PBudExpItemFactory.Fetch(p)).Skip(page.StartIndex).Take(page.RowCount); this.RaiseListChangedEvents = false; this.IsReadOnly = false; this.AddRange(i); this.IsReadOnly = true; this.RaiseListChangedEvents = true; } }
private void DataPortal_Fetch() { using (var ctx = ContextManager <EFDataContext> .GetManager(Database.EFramework)) { var i = from p in ctx.DataContext.FI_PBudExpItem select FI_PBudExpItemFactory.Fetch(p); this.RaiseListChangedEvents = false; this.IsReadOnly = false; this.AddRange(i); this.IsReadOnly = true; this.RaiseListChangedEvents = true; } }
private void DataPortal_Fetch(Common.Business.LambdaExpression lambda) { using (var ctx = ContextManager <EFDataContext> .GetManager(Database.EFramework)) { var exp = lambda.Resolve <FI_PBudExpItem>(); var i = from p in ctx.DataContext.FI_PBudExpItem.Where(exp) select FI_PBudExpItemFactory.Fetch(p); this.RaiseListChangedEvents = false; this.IsReadOnly = false; this.AddRange(i); this.IsReadOnly = true; this.RaiseListChangedEvents = true; } }