C# Reference v0.0

Initializing

Initializing a new client is pretty straightforward. Find your project url and public key from the admin panel and pass it into your client initialization function.

supabase-csharp is heavily dependent on Models deriving from BaseModel. To interact with the API, one must have the associated model (see example) specified.

Leverage Table, PrimaryKey, and Column attributes to specify names of classes/properties that are different from their C# Versions.


var url = Environment.GetEnvironmentVariable("SUPABASE_URL");
var key = Environment.GetEnvironmentVariable("SUPABASE_KEY");

var options = new Supabase.SupabaseOptions
{
    AutoConnectRealtime = true
};

var supabase = new Supabase.Client(url, key, options);
await supabase.InitializeAsync();