C#: Upsert data

Performs an UPSERT into the table.

Examples

Upsert your data

var model = new City
\{
  Id = 554,
  Name = "Middle Earth"
\};

await supabase.From<City>().Upsert(model);

Upserting into tables with constraints

var model = new City
\{
  Id = 554,
  Name = "Middle Earth"
\};

await supabase
  .From<City>()
  .OnConflict(x => x.Name)
  .Upsert(model);

Return the exact number of rows

var model = new City
\{
  Id = 554,
  Name = "Middle Earth"
\};

await supabase
  .From<City>()
  .Upsert(model, new QueryOptions \{ Count = QueryOptions.CountType.Exact \});