When passing a pre-configured RowObject to AddRowObject the RowId is automatically assigned as expected, however it expects the RowAction to be set prior to adding. Likewise, when adding a RowObject without pre-configuring it does automatically set the RowAction to Add but requires that the RowId be provided.
I am proposing we add two new overloads to AddRowObject to support this.
public static IFormObject AddRowObject(IFormObject formObject)
{
// Adds an empty RowObject with RowId automatically assigned and RowAction set to Add.
}
public static IFormObject AddRowObject(IFormObject formObject, string parentRowId)
{
// Adds an empty RowObject with RowId automatically assigned and RowAction set to Add. Sets the ParentRowId.
}
It makes sense when passing in a complete RowObject to not assume the Add intent (e.g., arranging a unit test).