ERLB CSLA 3.8.1 Save Exception

ERLB CSLA 3.8.1 Save Exception

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


xAvailx posted on Monday, May 10, 2010

I am trying to create an editable root list (ERLB). When I try saving I receive an "Invalid Operation - updated not allowed" exception. I rarely use this pattern, but it seems from the book that business list base provides a default implementation of the DataPortal_Update method, but that doesn't seem to be the case. 

All I am trying to do is load a collection of objects and try to save them. 
e.g.

var myCol = MyCollection.Load(id);
myCol[0].Property = "Updated";
myCol.Save();

Any help is appreciated! 

xAvailx replied on Monday, May 10, 2010

Oh boy, looks like last time I worked on one of these was about 1 year ago. And seems like I posted the same question and Andy responded! :)

http://forums.lhotka.net/forums/p/6920/33182.aspx#33182

I will ask again what I posted as a reply

"One request, Rocky, could the templates be updated to include this? May save some confusion for others down the road. "

One year later, seems like it could have saved me some confusion :)

Thx

RockfordLhotka replied on Monday, May 10, 2010

Fixed in the CSLA 4 templates.

Though we're talking about BLB here, not ERLB. There is no DataPortal_Update() in an ERLB subclass.

xAvailx replied on Monday, May 10, 2010

My bad, I see my mistake now.

I was referring to the Editable Root Collection stereotype, not the EditableRootListBase class. 

Sorry for the confusion and thanks for fixing the template :)

Copyright (c) Marimer LLC