Source/NFX/DataAccess/CRUD/RowsetBase.cs
/// <summary>
/// Tries to find a row with the same set of key fields in this table and if found, replaces it and returns its index,
/// otherwise returns -1
/// </summary>
/// <param name="rowUpgrade">
///   When not null, is called with old and new instance of the row to be updated. It returns
///   the row to be saved. Note that the returned row must have the same key and schema or else the function will throw.
/// </param>
Tries to find a row with the same set of key fields in this table and if found, replaces it and returns its index,
otherwise returns -1
Tries to find a row with the same set of key fields in this table and if found replaces it and returns its index otherwise returns - 1
protected virtual int DoUpdate(Row row, IDataStoreKey key = null, Func<Row, Row, Row> rowUpgrade = null)
            {
               int dummy;
               var idx = SearchForRow(row, out dummy);
               if (idx<0) return -1;
               DoUpgrade(dummy, row, rowUpgrade);
               return idx;
            }
protected virtual int DoUpdate ( Row row , IDataStoreKey key = null , Func < Row , Row , Row > rowUpgrade = null ) { int dummy ; var idx = SearchForRow ( row , out dummy ) ; if ( idx < 0 ) return - 1 ; DoUpgrade ( dummy , row , rowUpgrade ) ; return idx ; }
Tries to find a row with the same set of key fields in this table and if found, replaces it and returns its index,
otherwise returns -1
Tries to find a row with the same set of key fields in this table and if found replaces it and returns its index otherwise returns - 1
row
Row
key
IDataStoreKey
rowUpgrade
Func<Row, Row, Row>
When not null, is called with old and new instance of the row to be updated. It returns
the row to be saved. Note that the returned row must have the same key and schema or else the function will throw.
When not null is called with old and new instance of the row to be updated . It returns the row to be saved . Note that the returned row must have the same key and schema or else the function will throw .