EditableRootListBase - The Correct Way
EditableRootListBase - The Correct WayOld forum URL: forums.lhotka.net/forums/t/7110.aspx
Pieter posted on Tuesday, June 16, 2009Hi All,
Is this the correct way to implement an EditableRootListBase in version 3.6? :
public class Customers : EditableRootListBase<Customer>
#region Business Methods
protected override object AddNewCore()
Customer item = Customer.NewCustomer;
#region Factory Methods
public static Customers GetList()
this.AllowEdit = true;
this.AllowNew = true;
this.AllowRemove = true;
#region Data Access
private void DataPortal_Fetch()
using (var mgr = ContextManager<Northwind.DALLinq.NorthwindDataContext>
RaiseListChangedEvents = false;
from row in mgr.DataContext.Customers
RaiseListChangedEvents = true;
rfcdejong replied on Tuesday, June 16, 2009It looks fine to me, ignoring the data access part.
And assuming u ment to use the BusinessListBase<T, C> as base class.
Pieter replied on Wednesday, June 17, 2009Can you please give an example of the correct data access part and what you mean by BusinessListBase<T, C> as base class ?
rfcdejong replied on Wednesday, June 17, 2009
Sorry for confusing you, u could use a EditableRootListBase as well (if u want to edit directly in the root).
I didn't look at your data access, it could be working.
Copyright (c) Marimer LLC