CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

EditableRootList Saving Object But Not Marking Them As Old

rated by 0 users
Answered (Verified) This post has 1 verified answer | 1 Reply | 1 Follower

Top 200 Contributor
46 Posts
mattruma posted on Mon, Apr 23 2012 5:00 PM

I am trying to creating an EditableRootList object a BusinessListBase<EditableRootList, EditableChild> ... Everything seems to work ... but when I call Save, new objects are still marked as new ... I have the following code in my EditableRootList for handling the updates ...

        [Csla.Transactional(Csla.TransactionalTypes.TransactionScope)]
        protected override void DataPortal_Update()
        {
            this.Child_Update();
        }

When I run the following code ...

var apiTokenEditList = ApiTokenEditList.Fetch();
 
            apiTokenEditList.Add(DataHelper.RandomString(20));
            apiTokenEditList.Add(DataHelper.RandomString(20));
            apiTokenEditList.Add(DataHelper.RandomString(20));
 
            apiTokenEditList.Save();

 

I still have (3) new objects in apiTokenEditList ... even though the records were persisted to the database ... any idea why this is happening?

 

Answered (Verified) Verified Answer

Top 200 Contributor
46 Posts
Verified by mattruma

Just me being silly ... will leave this up in case someone else runs into this issue ... but the fix was simply ...

 apiTokenEditList = apiTokenEditList.Save();

 

Page 1 of 1 (2 items) | RSS

Copyright (c) 2006-2010 Marimer LLC. All rights reserved.
Email admin@lhotka.net for support.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems