-
Hello all, Im hoping someone can help me out. Im trying to follow the ProjectTracker sample and I cant seem to get it working but I am not sure if im doing it correctly. Im trying to update the business object with the Editable root list but it only calls Update. Do I need to add the conditions to verify if the object IsNew or IsDirty so that it calls the correct method Update or Insert for each editable root object in the List? Below is what I have. So I have a BusinessBase object with a editable list I call Update this works okay although when the code calls the dal.Update(data); my call is jumping all over the place which is odd. Before I would just call the dal.Update method and go right back to process the children. Anyway. Proceed to below:
The FieldManager.UpdateChildren(this); will then call the BusinessListBase AspNetUserRolesEditList. I read that the [ UpdateChild ] is needed since this list is of type editable root object (BusinessBase). Im not sure if I need to add a condition in the foreach to verify if the child object is IsDirty and IsNew so that I call insert and not update. The CSLA 4.0 book mentioned that I would need to follow the following also:
Below is my AspNetUserRolesEdit object also
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hello Once again found the issue. I was calling [Inject] IDataPortal portal and not [Inject] IChildDataPortal portal [Serializable]
} |
Beta Was this translation helpful? Give feedback.
-
I found the solution. It seems the since I am using a Editable root object as a child I need to add a insert method without any parameters.
|
Beta Was this translation helpful? Give feedback.
I found the solution. It seems the since I am using a Editable root object as a child I need to add a insert method without any parameters.