Why is parameterless DataPortal.Create not allowed in BusinessListBase object?

Why is parameterless DataPortal.Create not allowed in BusinessListBase object?

Old forum URL: forums.lhotka.net/forums/t/7557.aspx


j055 posted on Wednesday, September 02, 2009

I have an EditableRootList derived from BusinessListBase. When I call DataPortal.Create(); I get exception:

Csla.DataPortalException: DataPortal.Create failed (System.NotSupportedException: Invalid operation - create not allowed
at Csla.BusinessListBase`2.DataPortal_Create()

I want to create an empty list. I assumed the base.DataPortal_Create() would handle things without an error. I'm using Csla 3.7.0. I can override DataPortal_Create as e.g.:

protected override void DataPortal_Create()
{
//base.DataPortal_Create();
}

but it seems a little messy. Can you suggest a clean implementation?


Thanks
Andrew

RockfordLhotka replied on Wednesday, September 02, 2009

That seems like an oversight. I believe the BusinessBase method defaults to just not doing anything, and the BLB one should too. I'll add this to the to-do list.

j055 replied on Thursday, September 03, 2009

Thank you

Copyright (c) Marimer LLC