This project is read-only.

Added new property to Post.cs, changing value updates Post list object & database the first time but only Post list object on subsequesnt changes

Topics: Business Logic Layer
Jul 14, 2014 at 7:45 PM
Edited Jul 14, 2014 at 7:52 PM
I needed to add a new custom property to Post.cs. After loading up the website for the first time I go to edit the post and changing the value updates the Post list object & database the first time. All subsequent changes to the new property of the same post only updates the Post list object but not the database. If I restart the website and repeat the Post list object and database updates but again only the first time.

After stepping through the code it appears the IsChanged property is not getting set to true in the Save method in BusinessBase.cs and therefore the Update method isn't called.

Here's the new property in Post.cs. What am I missing? I'm using BE 1.6 by the way.
        private PostSource _Source;
        public PostSource Source
            get { return _Source; }
                if (value != _Source)

                _Source = value;
Jul 14, 2014 at 8:16 PM
I set a break point on the set of the Source property and it doesn't get hit after the first update so it's not getting set as changed. What's going on??
Jul 14, 2014 at 8:56 PM
Edited Jul 14, 2014 at 10:52 PM
So it looks like this new class PostSource needs to inherit from BusinessBase so that it implements INotifyPropertyChanged.