addOrUpdate

open suspend override fun addOrUpdate(entities: List<T>, entity: T): List<T>

sends a post-(for add) or a put-(for update) request to remote/{id} with the serialized entity in it's body. The initialId is used to determine if it should saved or updated.

Return

list after add or update

Parameters

entities

entity list

entity

entity to add or update