Supabase LogoDOCS
Back to Main Menu
C#
  • Introduction
  • Installing
  • Initializing
  • Database
  • Fetch data
  • Insert data
  • Update data
  • Upsert data
  • Delete data
  • Call a Postgres function
  • Using filters
  • Using modifiers
  • Auth
  • Create a new user
  • Sign in a user
  • Sign in a user through OTP
  • Sign in a user through OAuth
  • Sign out a user
  • Verify and log in through OTP
  • Retrieve a session
  • Retrieve a user
  • Update a user
  • Listen to auth events
  • Functions
  • Invoke a function
  • Realtime
  • Subscribe to channel
  • Unsubscribe from a channel
  • Retrieve all channels
  • Storage
  • Create a bucket
  • Retrieve a bucket
  • List all buckets
  • Update a bucket
  • Delete a bucket
  • Empty a bucket
  • Upload a file
  • Download a file
  • List all files in a bucket
  • Replace an existing file
  • Move an existing file
  • Delete files in a bucket
  • Create a signed URL
  • Retrieve public URL
Supabase LogoDOCS
Supabase.comDashboard
C# Reference v0.0

Upsert data

Performs an UPSERT into the table.

  • Primary keys should be included in the data payload in order for an update to work correctly.
  • Primary keys must be natural, not surrogate. There are however, workarounds for surrogate primary keys.

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

await supabase.From<City>().Upsert(model);
  • Need some help?

    Contact support
  • Lastest product updates?

    See Changelog
  • Something's not right?

    Check system status

© Supabase Inc—ContributingAuthor StyleguideOpen SourceSupaSquad