code: function (state, payload) {
          var entity = payload.entity;
          var data = payload.data;
          var options = OptionsBuilder.createPersistOptions(payload);
          var result = payload.result;
          result.data = (new Query(state, entity)).create(data, options);
      }
docs: Save given data to the store by replacing all existing records in the
  store. If you want to save data without replacing existing records,
  use the `insert` method instead.