create method
FutureOr<void>
create(
- ProjectFacilityModel entity, {
- bool createOpLog = false,
- DataOperation dataOperation = DataOperation.create,
override
The create
method creates a new entity.
Implementation
@override
FutureOr<void> create(
ProjectFacilityModel entity, {
bool createOpLog = false,
DataOperation dataOperation = DataOperation.create,
}) async {
return retryLocalCallOperation(() async {
await sql.batch((batch) async {
batch.insert(
sql.projectFacility,
entity.companion,
mode: InsertMode.insertOrReplace,
);
});
await super.create(
entity,
createOpLog: createOpLog,
);
});
}