- This reference documents every object and method available in Supabase's C# library, [supabase-csharp](https://www.nuget.org/packages/supabase-csharp). You can use supabase-csharp to interact with your Postgres database, listen to database changes, invoke Deno Edge Functions, build login and user management functionality, and manage large files.
+ This reference documents every object and method available in Supabase's C# library, [supabase](https://www.nuget.org/packages/supabase). You can use `Supabase` to interact with your Postgres database, listen to database changes, invoke Deno Edge Functions, build login and user management functionality, and manage large files.
{/* prettier-ignore */}
@@ -24,6 +24,6 @@ hideTitle: true
The C# client library is created and maintained by the Supabase community, and is not an official library. Please be tolerant of areas where the library is still being developed, and — as with all the libraries — feel free to contribute wherever you find issues.
- Huge thanks to official maintainer, [Joseph Schultz](https://github.com/acupofjose), and to [Ben Randall](https://github.com/veleek) and [Rhuan Barros](https://github.com/rhuanbarros) for their help.
+ Huge thanks to official maintainer, [Joseph Schultz](https://github.com/acupofjose). As well as [Will Iverson](https://github.com/wiverson), [Ben Randall](https://github.com/veleek), and [Rhuan Barros](https://github.com/rhuanbarros) for their help.
diff --git a/apps/docs/docs/ref/csharp/release-notes.mdx b/apps/docs/docs/ref/csharp/release-notes.mdx
index 291636cfb08..751fc13c424 100644
--- a/apps/docs/docs/ref/csharp/release-notes.mdx
+++ b/apps/docs/docs/ref/csharp/release-notes.mdx
@@ -3,372 +3,36 @@ id: release-notes
title: Release Notes
---
-## 0.11.0 - 2023-05-24
-
-- Update dependency: postgrest-csharp@3.2.0
- - General codebase and QOL improvements. Exceptions are generally thrown through `PostgrestException` now instead
- of `Exception`. A `FailureHint.Reason` is provided with failures if possible to parse.
- - `AddDebugListener` is now available on the client to help with debugging
- - Merges [#65](https://github.com/supabase-community/postgrest-csharp/pull/65) Cleanup + Add better exception handling
- - Merges [#66](https://github.com/supabase-community/postgrest-csharp/pull/66) Local test Fixes
- - Fixes [#67](https://github.com/supabase-community/postgrest-csharp/issues/67) Postgrest Reference attribute is
- producing StackOverflow for circular references
-- Update dependency: gotrue-csharp@4.0.2
- - [#58](https://github.com/supabase-community/gotrue-csharp/issues/58) - Add support for the `reauthentication` endpoint which allows for secure password changes.
-- Update dependency: realtime-csharp@6.0.1
- - Updates publishing action for future packages, includes README and icon.
- - Merges [#28](https://github.com/supabase-community/realtime-csharp/pull/28) and [#30](https://github.com/supabase-community/realtime-csharp/pull/30)
- - The realtime client now takes a "fail-fast" approach. On establishing an initial connection, client will throw
- a `RealtimeException` in `ConnectAsync()` if the socket server is unreachable. After an initial connection has been
- established, the **client will continue attempting reconnections indefinitely until disconnected.**
- - [Major, New] C# `EventHandlers` have been changed to `delegates`. This should allow for cleaner event data access over
- the previous subclassed `EventArgs` setup. Events are scoped accordingly. For example, the `RealtimeSocket` error
- handlers will receive events regarding socket connectivity; whereas the `RealtimeChannel` error handlers will receive
- events according to `Channel` joining/leaving/etc. This is implemented with the following methods prefixed by (
- Add/Remove/Clear):
- - `RealtimeBroadcast.AddBroadcastEventHandler`
- - `RealtimePresence.AddPresenceEventHandler`
- - `RealtimeSocket.AddStateChangedHandler`
- - `RealtimeSocket.AddMessageReceivedHandler`
- - `RealtimeSocket.AddHeartbeatHandler`
- - `RealtimeSocket.AddErrorHandler`
- - `RealtimeClient.AddDebugHandler`
- - `RealtimeClient.AddStateChangedHandler`
- - `RealtimeChannel.AddPostgresChangeHandler`
- - `RealtimeChannel.AddMessageReceivedHandler`
- - `RealtimeChannel.AddErrorHandler`
- - `Push.AddMessageReceivedHandler`
- - [Major, new] `ClientOptions.Logger` has been removed in favor of `Client.AddDebugHandler()` which allows for
- implementing custom logging solutions if desired.
- - A simple logger can be set up with the following:
- ```c#
- client.AddDebugHandler((sender, message, exception) => Debug.WriteLine(message));
- ```
- - [Major] `Connect()` has been marked `Obsolete` in favor of `ConnectAsync()`
- - Custom reconnection logic has been removed in favor of using the built-in logic from `Websocket.Client@4.6.1`.
- - Exceptions that are handled within this library have been marked as `RealtimeException`s.
- - The local, docker-composed test suite has been brought back (as opposed to remotely testing on live supabase servers)
- to test against.
- - Comments have been added throughout the entire codebase and an `XML` file is now generated on build.
-
-## 0.10.0 - 2023-05-14
-
-- Changes options to require `Supabase.SupabaseOptions.SessionPersistor` from using `ISupabaseSessionHandler`
- to `IGotrueSessionPersistance` (these are now synchronous operations).
-- Update dependency: gotrue-csharp@4.0.1
- - [#60](https://github.com/supabase-community/gotrue-csharp/pull/60) - Add interfaces, bug fixes, additional error
- reason detection. Thanks [@wiverson](https://github.com/wiverson)!
- - [#57](https://github.com/supabase-community/gotrue-csharp/pull/57) Refactor exceptions, code cleanup, and move to
- delegate auth state changes
- - Huge thank you to [@wiverson](https://github.com/wiverson) for his help on this refactor and release!
- - Changes
- - Exceptions have been simplified to a single `GotrueException`. A `Reason` field has been added
- to `GotrueException` to clarify what happened. This should also be easier to manage as the Gotrue
- server API & messages evolve.
- - The session delegates for `Save`/`Load`/`Destroy` have been simplified to no longer require `async`.
- - Console logging in a few places (most notable the background refresh thread) has been removed
- in favor of a notification method. See `Client.AddDebugListener()` and the test cases for examples.
- This will allow you to implement your own logging strategy (write to temp file, console, user visible
- err console, etc).
- - The client now more reliably emits AuthState changes.
- - There is now a single source of truth for headers in the stateful Client - the `Options` headers.
- - New feature:
- - Added a `Settings` request to the stateless API only - you can now query the server instance to
- determine if it's got the settings you need. This might allow for things like a visual
- component in a tool to verify the GoTrue settings are working correctly, or tests that run differently
- depending on the server configuration.
- - Implementation notes:
- - Test cases have been added to help ensure reliability of auth state change notifications
- and persistence.
- - Persistence is now managed via the same notifications as auth state change
-
-## 0.9.1 - 2023-04-28
-
-- Update dependency: gotrue-csharp@3.1.1
- - Implements `SignInWithIdToken` for Apple/Google signing from LW7. A HUGE thank you
- to [@wiverson](https://github.com/wiverson)!
-- Update dependency: realtime-csharp@5.0.5
- - Re: [#27](https://github.com/supabase-community/realtime-csharp/issues/27) `PostgresChangesOptions` was not
- setting `listenType` in constructor. Thanks [@Kuffs2205](https://github.com/Kuffs2205)
-- Update dependency: supabase-storage-csharp@1.2.10
- - Re: [#7](https://github.com/supabase-community/storage-csharp/issues/7) Implements a `DownloadPublicFile` method.
-
-## 0.9.0 - 2023-04-12
-
-- Update dependency: gotrue-csharp@3.1.0
-
- - [Minor] Implements PKCE auth flow. SignIn using a provider now returns an instance of `ProviderAuthState` rather
- than a `string`.
-
-- Update dependency: supabase-storage-csharp@1.2.9
- - Implements storage features from LW7:
- - feat: custom file size limit and mime types at bucket
- level [supabase/storage-js#151](https://github.com/supabase/storage-js/pull/151) file size and mime type
- limits per bucket
- - feat: quality option, image
- transformation [supabase/storage-js#145](https://github.com/supabase/storage-js/pull/152) quality option for
- image transformations
- - feat: format option for webp
- support [supabase/storage-js#142](https://github.com/supabase/storage-js/pull/142) format option for image
- transformation
-
-## 0.8.8 - 2023-03-29
-
-- Update dependency: gotrue-csharp@3.0.6
- - Supports adding `SignInOptions` (i.e. `RedirectTo`) on `OAuth Provider` SignIn requests.
-
-## 0.8.7 - 2023-03-23
-
-- Update dependency: realtime-csharp@5.0.4
- - Re: [#26](https://github.com/supabase-community/realtime-csharp/pull/26) - Fixes Connect() not returning callback
- result when the socket isn't null. Thanks [@BlueWaterCrystal](https://github.com/BlueWaterCrystal)!
-
-## 0.8.6 - 2023-03-23
-
-- Update dependency: supabase-storage-csharp@1.2.8
- - [Merge #5](https://github.com/supabase-community/storage-csharp/pull/5) Added search string as an optional search
- parameter. Thanks [@ElectroKnight22](https://github.com/ElectroKnight22)!
-
-## 0.8.5 - 2023-03-10
-
-- Update dependency: realtime-csharp@5.0.3
- - Re: [#25](https://github.com/supabase-community/realtime-csharp/issues/25) - Support Channel being resubscribed
- after having been unsubscribed, fixes rejoin timer being erroneously called on channel `Unsubscribe`.
- Thanks [@Kuffs2205](https://github.com/Kuffs2205)!
-
-## 0.8.4 - 2023-03-03
-
-- Update dependency: supabase-storage-csharp@1.2.7
- - Re: [#4](https://github.com/supabase-community/storage-csharp/issues/4) Implementation for `ClientOptions` which
- supports specifying Upload, Download, and Request timeouts.
-- Update dependency: realtime-csharp@5.0.2
- - Re: [#24](https://github.com/supabase-community/realtime-csharp/issues/24) - Fixes join failing until reconnect
- happened + adds access token push on channel join. Big thank you to [@Honeyhead](https://github.com/honeyhead) for
- the help debugging and identifying!
-
-## 0.8.3 - 2023-02-26
-
-- Update dependency: supabase-storage-csharp@1.2.5
- - Provides fix
- for [supabase-community/supabase-csharp#54](https://github.com/supabase-community/supabase-csharp/issues/54) -
- Dynamic headers were always being overwritten by initialized token headers, so the storage client would not
- receive user's access token as expected.
- - Provides fix for upload progress not reporting
- in [supabase-community/storage-csharp#3](https://github.com/supabase-community/storage-csharp/issues/3)
-- Update dependency: gotrue-csharp@3.0.5
- - Fixes [#44](https://github.com/supabase-community/gotrue-csharp/issues/44) - refresh timer should automatically
- reattempt (interval of 5s) for HTTP exceptions - gracefully exits on invalid refresh and triggers
- an `AuthState.Changed` event
-
-## 0.8.2 - 2023-02-26
-
-- Update dependency: supabase-storage-csharp@1.2.4
- - `UploadOrUpdate` now appropriately throws request exceptions
-
-## 0.8.1 - 2023-02-06
-
-- Update dependency: realtime-csharp@5.0.1
- - Re: [#22](https://github.com/supabase-community/realtime-csharp/issues/22) - `SerializerSettings` were not being
- passed to `PostgresChangesResponse` - Thanks [@Shenrak](https://github.com/Shenrak) for the help debugging!
-
-## 0.8.0 - 2023-01-31
-
-- Update dependency: realtime-csharp@5.0.0
- - Re: [#21](https://github.com/supabase-community/realtime-csharp/pull/21) Provide API for `presence`, `broadcast` and `postgres_changes`
- - [Major, New] `Channel.PostgresChanges` event will receive the wildcard `*` changes event, not `Channel.OnMessage`.
- - [Major] `Channel.OnInsert`, `Channel.OnUpdate`, and `Channel.OnDelete` now conform to the server's payload of `Response.Payload.**Data**`
- - [Major] `Channel.OnInsert`, `Channel.OnUpdate`, and `Channel.OnDelete` now return `PostgresChangesEventArgs`
- - [Minor] Rename `Channel` to `RealtimeChannel`
- - Supports better handling of disconnects in `RealtimeSocket` and adds a `Client.OnReconnect` event.
- - [Minor] Moves `ChannelOptions` to `Channel.ChannelOptions`
- - [Minor] Moves `ChannelStateChangedEventArgs` to `Channel.ChannelStateChangedEventArgs`
- - [Minor] Moves `Push` to `Channel.Push`
- - [Minor] Moves `Channel.ChannelState` to `Constants.ChannelState`
- - [Minor] Moves `SocketResponse`, `SocketRequest`, `SocketResponsePayload`, `SocketResponseEventArgs`, and `SocketStateChangedEventArgs` to `Socket` namespace.
- - [New] Adds `RealtimeBroadcast`
- - [New] Adds `RealtimePresence`
- - [Improvement] Better handling of disconnection/reconnection
-- Update dependency: postgrest-csharp@3.1.3
- - Another fix for [#61](https://github.com/supabase-community/postgrest-csharp/issues/61) which further typechecks nullable values.
-
-## 0.7.2 - 2023-01-27
-
-- Update dependency: gotrue-csharp@3.0.4
- - Makes `Session.CreatedAt` a publicly settable property, which should fix incorrect dates on retrieved `Session`s.
-- Update dependency: postgrest-csharp@3.1.2
- - Fix [#61](https://github.com/supabase-community/postgrest-csharp/issues/61) which did not correctly parse Linq `Where` when encountering a nullable type.
- - Add missing support for transforming for `== null` and `!= null`
-
-## 0.7.1 - 2023-01-17
-
-- Update dependency: postgrest-csharp@3.1.1
- - Fix issue from supabase-community/supabase-csharp#48 where boolean model properties would not be evaluated in predicate expressions
-
-## 0.7.0 - 2023-01-16
-
-- Update dependency: postgrest-csharp@3.1.0
- - [Minor] Breaking API Change: `PrimaryKey` attribute defaults to `shouldInsert: false` as most uses will have the Database generate the primary key.
- - Merged [#60](https://github.com/supabase-community/postgrest-csharp/pull/60) which Added linq support for `Select`, `Where`, `OnConflict`, `Columns`, `Order`, `Update`, `Set`, and `Delete`
-
-## 0.6.2 - 2022-11-22
-
-- Update dependency: postgrest-csharp@3.0.4
- - `GetHeaders` is now passed to `ModeledResponse` and `BaseModel` so that the default `Update` and `Delete` methods use the latest credentials
- - `GetHeaders` is used in `Rpc` calls (re: [#39](https://github.com/supabase-community/supabase-csharp/issues/39))
-
-## 0.6.1 - 2022-11-12
-
-- [Hotfix] `GetHeaders` was not passing properly to `SupabaseTable` and `Gotrue.Api`
-
-## 0.6.0 - 2022-11-12
-
-[BREAKING CHANGES]
-
-- `Client` is no longer a singleton, singleton interactions (if desired) are left to the developer to implement.
-- `Client` supports injection of dependent clients after initialization via property:
- - `Auth`
- - `Functions`
- - `Realtime`
- - `Postgrest`
- - `Storage`
-- `SupabaseModel` contains no logic but remains for backwards compatibility. (Marked `Obsolete`)
-- `ClientOptions.ShouldInitializeRealtime` was removed (no longer auto initialized)
-- `ClientOptions` now references an `ISupabaseSessionHandler` which specifies expected functionality for session persistence on Gotrue (replaces `ClientOptions.SessionPersistor`, `ClientOptions.SessionRetriever`, and `ClientOptions.SessionDestroyer`).
-- `supabase-csharp` and all child libraries now have support `nullity`
-
-Other Changes:
-
-- Update dependency: functions-csharp@1.2.1
-- Update dependency: gotrue-csharp@3.0.2
-- Update dependency: postgrest-csharp@3.0.2
-- Update dependency: realtime-csharp@4.0.1
-- Update dependency: supabase-storage-csharp@1.2.3
-- Update dependency: supabase-core@0.0.2
-
-Big thank you to [@veleek](https://github.com/veleek) for his insight into these changes.
-
-Re: [#35](https://github.com/supabase-community/supabase-csharp/issues/35), [#34](https://github.com/supabase-community/supabase-csharp/issues/34), [#23](https://github.com/supabase-community/supabase-csharp/issues/23), [#36](https://github.com/supabase-community/supabase-csharp/pull/36)
-
-## 0.5.3 - 2022-10-11
-
-- Update dependency: postgrest-csharp@2.1.0
- - [Minor] Breaking API change: Remove `BaseModel.PrimaryKeyValue` and `BaseModel.PrimaryKeyColumn` in favor of a `PrimaryKey` dictionary with support for composite keys.
- - Re: [#48](https://github.com/supabase-community/postgrest-csharp/issues/48) - Add support for derived models on `ReferenceAttribute`
- - Re: [#49](https://github.com/supabase-community/postgrest-csharp/issues/49) - Added `Match(T model)`
-
-## 0.5.2 - 2022-9-13
-
-- Update dependency: postgrest-csharp@2.0.12
- - Merged [#47](https://github.com/supabase-community/postgrest-csharp/pull/49) which added cancellation token support to `Table` methods. Thanks [@devpikachu](https://github.com/devpikachu)!
-
-## 0.5.1 - 2022-8-1
-
-- Update dependency: postgrest-csharp@2.0.11
-- Update dependency: supabase-storage-csharp@1.1.1
-
-## 0.5.0 - 2022-7-17
-
-- Update dependency: postgrest-csharp@2.0.9
-- Update dependency: realtime-csharp@3.0.1
-- Update dependency: supabase-storage-csharp@1.1.0
- - API Change [Breaking/Minor] Library no longer uses `WebClient` and instead leverages `HttpClient`. Progress events on `Upload` and `Download` are now handled with `EventHandler` instead of `WebClient` EventHandlers.
-
-## 0.4.4 - 2022-5-24
-
-- Update dependency: gotrue-csharp@2.4.5
-- Update dependency: postgrest-csharp@2.0.8
-
-## 0.4.3 - 2022-5-13
-
-- Update dependency: gotrue-csharp@2.4.4
-
-## 0.4.2 - 2022-4-30
-
-- Update dependency: gotrue-csharp@2.4.3
-
-## 0.4.1 - 2022-4-23
-
-- Update dependency: gotrue-csharp@2.4.2
-
-## 0.4.0 - 2022-4-12
-
-- Add support for functions-csharp@1.0.1, giving access to invoking Supabase's edge functions.
-- Update dependency: gotrue-csharp@2.4.1
-
-## 0.3.5 - 2022-4-11
-
-- Update dependency: postgres-csharp@2.0.7
-
-## 0.3.4 - 2022-03-28
-
-- Update dependency: gotrue-csharp@2.4.0
-
-## 0.3.3 - 2022-02-27
-
-- Update dependency: gotrue-csharp@2.3.6
-- Update dependency: supabase-storage-csharp@1.0.2
-
-## 0.3.2 - 2022-02-18
-
-- Update dependency: realtime-csharp@3.0.0
- - Exchange existing websocket client: [WebSocketSharp](https://github.com/sta/websocket-sharp) for [Marfusios/websocket-client](https://github.com/Marfusios/websocket-client) which adds support for Blazor WASM apps.
- Ref: [#14](https://github.com/supabase-community/realtime-csharp/pull/14)
-
-## 0.3.1 - 2022-01-20
-
-- Update dependency: gotrue-csharp@2.3.5
- - [#23](https://github.com/supabase-community/gotrue-csharp/pull/23) Added `redirect_url` option for MagicLink sign in (Thanks [@MisterJimson](https://github.com/MisterJimson))
- - [#21](https://github.com/supabase-community/gotrue-csharp/pull/21) Added SignOut method to Stateless Client (Thanks [@fplaras](https://github.com/fplaras))
-
-## 0.3.0 - 2021-12-30
-
-- Update dependency: postgrest-csharp@2.0.6
- - Add support for `NullValueHandling` to be specified on a `Column` Attribute and for it to be honored on Inserts and Updates. Defaults to: `NullValueHandling.Include`.
- - Implements [#38](https://github.com/supabase-community/postgrest-csharp/issues/38)
-- Update dependency: realtime-csharp@2.0.8
- - Implement Upstream Realtime RLS Error Broadcast Handler
- - Implements [#12](https://github.com/supabase-community/realtime-csharp/issues/12)
- - `SocketResponse` now exposes a method: `OldModel`, that hydrates the `OldRecord` property into a model.
-
-## 0.2.12 - 2021-12-29
-
-- Update dependency: gotrue-csharp@2.3.3
- - `SignUp` will return a `Session` with a _populated `User` object_ on an unconfirmed signup.
- - Fixes [#19](https://github.com/supabase-community/gotrue-csharp/issues/19)
- - Developers who were using a `null` check on `Session.User` will need to adjust accordingly.
-- Update dependency: postgrest-csharp@2.0.5
- - Fix for [#37](https://github.com/supabase-community/postgrest-csharp/issues/37) - Return Type `minimal` would fail to resolve because of incorrect `Accept` headers. Added header and test to verify for future.
- - Fix for [#36](https://github.com/supabase-community/postgrest-csharp/issues/36) - Inserting/Upserting bulk records would fail while doing an unnecessary generic coercion.
-
-## 0.2.11 - 2021-12-24
-
-- Update dependency: gotrue-csharp@2.3.2 (changes CreateUser parameters to conform to `AdminUserAttributes`)
- - See [#15](https://github.com/supabase-community/supabase-csharp/issues/15)
- - See [#16](https://github.com/supabase-community/supabase-csharp/issues/16)
-- Update dependency: realtime-csharp@2.0.7
- - See [#13](https://github.com/supabase-community/supabase-csharp/issues/13)
-
-## 0.2.10 - 2021-12-23
-
-- Update dependency: gotrue-csharp@2.3.0 (adds metadata support for user signup, see [#14](https://github.com/supabase/community/issues/14))
-
-## 0.2.9 - 2021-12-9
-
-- Separate Storage client from Supabase repo and into `storage-csharp`, `supabase-csharp` now references new repo.
-
-## 0.2.8 - 2021-12-4
-
-- Update gotrue-csharp to 2.2.4
- - Adds support for `ListUsers` (paginate, sort, filter), `GetUserById`, `CreateUser`, and `UpdateById`
-
-## 0.2.7 - 2021-12-2
-
-- Update gotrue-csharp to 2.2.3
- - Adds support for sending password resets to users.
-
-## 0.2.6 - 2021-11-29
-
-- Support for [#12](https://github.com/supabase-community/supabase-csharp/issues/12)
-- Update realtime-csharp to 2.0.6
-- Update gotrue-csharp to 2.2.2
-- Add `StatelessClient` re:[#7](https://github.com/supabase-community/supabase-csharp/issues/7)
+## 1.0.0 - 2024-04-21
+
+- Assembly Name has been changed to `Supabase.dll`
+- Update dependency: `postgrest-csharp@5.0.0`
+ - [MAJOR] Moves namespaces from `Postgrest` to `Supabase.Postgrest`
+ - Re: [#135](https://github.com/supabase-community/supabase-csharp/issues/135) Update nuget package
+ name `postgrest-csharp` to `Supabase.Postgrest`
+- Update dependency: `gotrue-csharp@5.0.0`
+ - Re: [#135](supabase-community/supabase-csharp#135) Update nuget package name `gotrue-csharp` to `Supabase.Gotrue`
+ - Re: [#89](https://github.com/supabase-community/gotrue-csharp/issues/89), Only add `access_token` to request body
+ when it is explicitly declared.
+ - [MINOR] Re: [#89](https://github.com/supabase-community/gotrue-csharp/issues/89) Update signature
+ for `SignInWithIdToken` which adds an optional `accessToken` parameter, update doc comments, and
+ call `DestroySession` in method
+ - Re: [#88](https://github.com/supabase-community/gotrue-csharp/issues/88), Add `IsAnonymous` property to `User`
+ - Re: [#90](https://github.com/supabase-community/gotrue-csharp/issues/90) Implement `LinkIdentity`
+ and `UnlinkIdentity`
+- Update dependency: `realtime-csharp@7.0.0`
+ - Merges [#45](https://github.com/supabase-community/realtime-csharp/pull/45) - Updating
+ the `Websocket.Client@5.1.1`
+ - Re: [#135](https://github.com/supabase-community/supabase-csharp/issues/135) Update nuget package
+ name `realtime-csharp` to `Supabase.Realtime`
+- Update dependency: `storage-csharp@2.0.0`
+ - Re: [#135](https://github.com/supabase-community/supabase-csharp/issues/135) Update nuget package
+ name `storage-csharp` to `Supabase.Storage`
+- Update dependency: `functions-csharp@2.0.0`
+ - Re: [#135](https://github.com/supabase-community/supabase-csharp/issues/135) Update nuget package
+ name `functions-csharp` to `Supabase.Functions`
+- Update dependency: `core-csharp@1.0.0`
+ - Re: [#135](https://github.com/supabase-community/supabase-csharp/issues/135) Update nuget package
+ name `supabase-core`
+ to `Supabase.Core`
+- Adds comments to the remaining undocumented code.
diff --git a/apps/docs/docs/ref/csharp/v0/installing.mdx b/apps/docs/docs/ref/csharp/v0/installing.mdx
new file mode 100644
index 00000000000..4709791a7ec
--- /dev/null
+++ b/apps/docs/docs/ref/csharp/v0/installing.mdx
@@ -0,0 +1,35 @@
+---
+id: installing
+title: 'Installing & Initialization'
+slug: installing
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml
+---
+
+### Install from NuGet
+
+
+
+
+ You can install Supabase package from [nuget.org](https://www.nuget.org/packages/supabase-csharp/)
+
+
+
+
+
+
+
+
+ ```sh Terminal
+ dotnet add package supabase-csharp
+ ```
+
+
+
+
+
+
diff --git a/apps/docs/docs/ref/csharp/v0/introduction.mdx b/apps/docs/docs/ref/csharp/v0/introduction.mdx
new file mode 100644
index 00000000000..1fed5441e0f
--- /dev/null
+++ b/apps/docs/docs/ref/csharp/v0/introduction.mdx
@@ -0,0 +1,29 @@
+---
+id: introduction
+title: Introduction
+hideTitle: true
+---
+
+
+
+
+
C# Client Library
+
+ @supabase-community/supabase-csharp
+
+
+
+
+{/* prettier-ignore */}
+
+ This reference documents every object and method available in Supabase's C# library, [supabase-csharp](https://www.nuget.org/packages/supabase-csharp). You can use `Supabase` to interact with your Postgres database, listen to database changes, invoke Deno Edge Functions, build login and user management functionality, and manage large files.
+
+
+{/* prettier-ignore */}
+
+
+ The C# client library is created and maintained by the Supabase community, and is not an official library. Please be tolerant of areas where the library is still being developed, and — as with all the libraries — feel free to contribute wherever you find issues.
+
+ Huge thanks to official maintainer, [Joseph Schultz](https://github.com/acupofjose). As well as [Will Iverson](https://github.com/wiverson), [Ben Randall](https://github.com/veleek), and [Rhuan Barros](https://github.com/rhuanbarros) for their help.
+
+
diff --git a/apps/docs/docs/ref/csharp/v0/release-notes.mdx b/apps/docs/docs/ref/csharp/v0/release-notes.mdx
index 2ecb0ef3990..2ce380a99fc 100644
--- a/apps/docs/docs/ref/csharp/v0/release-notes.mdx
+++ b/apps/docs/docs/ref/csharp/v0/release-notes.mdx
@@ -3,4 +3,565 @@ id: release-notes
title: Release Notes
---
-## dart v0 this is the release notes file.
+## 0.16.2 - 2024-04-02
+
+- Update dependency: `gotrue-csharp@4.2.7`
+ - [#88](https://github.com/supabase-community/gotrue-csharp/issues/88) Implement `signInAnonymously` from the JS
+ client
+ - Include additional 3rd party providers in constants.
+
+## 0.16.1 - 2024-03-15
+
+- Update dependency: `postgrest-csharp@3.5.1`
+ - Re: [#147](https://github.com/supabase-community/supabase-csharp/issues/147) - Supports `Rpc` specifying a generic
+ type for its return.
+
+## 0.16.0 - 2024-03-12
+
+- Update dependency: `postgrest-csharp@3.5.0`
+ - Re: [#78](https://github.com/supabase-community/postgrest-csharp/issues/78), Generalize query filtering creation
+ in `Table` so that it matches new generic signatures.
+ - Move from `QueryFilter` parameters to a more generic `IPosgrestQueryFilter` to support constructing new
+ QueryFilters from a LINQ expression.
+ - Note: Lists of `QueryFilter`s will now need to be defined
+ as: `new List { new QueryFilter(), ... }`
+ - Adjust serialization of timestamps within a `QueryFilter` to support `DateTime` and `DateTimeOffset` using the
+ ISO-8601 (https://stackoverflow.com/a/115002)
+- Update dependency: `functions-csharp@1.3.2`
+ - Re: [#5](https://github.com/supabase-community/functions-csharp/issues/5) Add support for specifying Http Timeout
+ on a function call by adding `HttpTimeout` to `InvokeFunctionOptions`
+
+## 0.15.0 - 2024-01-08
+
+- Update Dependency: `gotrue-csharp@4.2.6`
+ - [#83](https://github.com/supabase-community/gotrue-csharp/pull/83) Replaces JWTDecoder package with
+ System.IdentityModel.Tokens.Jwt. Thanks [@FantasyTeddy](https://github.com/FantasyTeddy)!
+- Update Dependency: `postgrest-csharp@3.4.1`
+ - Re: [#85](https://github.com/supabase-community/postgrest-csharp/issues/85) Fixes problem when using multiple
+ .Order()
+ methods by merging [#86](https://github.com/supabase-community/postgrest-csharp/pull/86).
+ Thanks [@hunsra](https://github.com/hunsra)!
+ - Re: [#81](https://github.com/supabase-community/postgrest-csharp/issues/81)
+ - [Minor] Removes `IgnoreOnInsert`and `IgnoreOnUpdate` from `ReferenceAttribute` as changing these properties
+ to `false` does not currently provide the expected functionality.
+ - Fixes `Insert` and `Update` not working on models that have `Reference` specified on a property with a
+ non-null
+ value.
+
+## 0.14.0 - 2023-12-15
+
+- Update Dependency: `gotrue-csharp@4.2.5`
+ - [#82](https://github.com/supabase-community/gotrue-csharp/issues/81) - Implements #82 - Creates a `GenerateLink`
+ method on the `AdminClient` that supports `signup`, `invite`, `magiclink`, `recovery`, `email_change_new`
+ and `email_change_current`
+ - [#81](https://github.com/supabase-community/gotrue-csharp/issues/81) - Adds `InviteUserByEmailOptions` as a
+ parameter to the Gotrue Admin Client
+- Update Dependency: `postgrest-csharp@3.3.0`
+ - Re: [#78](https://github.com/supabase-community/postgrest-csharp/issues/78) Updates signatures for `Not`
+ and `Filter` to include generic types for a better development experience.
+ - Updates internal generic type names to be more descriptive.
+ - Add support for LINQ predicates on `Table.Not()` signatures
+
+## 0.13.7 - 2023-11-13
+
+- Update Dependency: `postgrest-csharp@3.2.10`
+ - Re: [#76](https://github.com/supabase-community/postgrest-csharp/issues/76) Removes the
+ incorrect `ToUniversalTime` conversion in the LINQ `Where` parser.
+
+## 0.13.6 - 2023-10-12
+
+- Update Dependency: `gotrue-csharp@4.2.3`
+ - Re: [#80](https://github.com/supabase-community/gotrue-csharp/pull/80) Fixes `Session.Expires()` not being
+ calculated correctly. Thanks [@dayjay](https://github.com/Dayjay)!
+
+## 0.13.5 - 2023-10-09
+
+- Update Dependency: `postgrest-csharp@3.2.9`
+ - Re: [supabase-csharp#115](https://github.com/supabase-community/supabase-csharp/discussions/115) Additional
+ support for a model referencing another model with multiple foreign keys.
+ - Re: [supabase-csharp#115](https://github.com/supabase-community/supabase-csharp/discussions/115) Adds support for
+ multiple references attached to the same model (foreign keys) on a single C# Model.
+
+## 0.13.4 - 2023-10-08
+
+- Update Dependency: `gotrue-csharp@4.2.2`
+ - Re: [#78](https://github.com/supabase-community/gotrue-csharp/issues/78) - Implements PKCE flow support
+ for `ResetPasswordForEmail`.
+
+## 0.13.3 - 2023-09-15
+
+- Re: [#107](https://github.com/supabase-community/supabase-csharp/issues/107) - removes Realtime socket being
+ disconnected on a User sign-out - only the subscriptions should be removed.
+
+## 0.13.2 - 2023-09-15
+
+- Update dependency: `postgrest-csharp@3.2.7`
+ - Implements a `TableWithCache` for `Get` requests that can pull reactive Models from cache before making a remote
+ request.
+ - Re: [supabase-csharp#85](https://github.com/supabase-community/supabase-csharp/issues/85) Includes sourcelink
+ support.
+ - Re: [#75](https://github.com/supabase-community/postgrest-csharp/pull/75) Fix issue with marshalling of stored
+ procedure arguments. Big thank you to [@corrideat](https://github.com/corrideat)!
+
+## 0.13.1 - 2023-08-26
+
+- Update dependency: `supabase-storage-csharp@1.4.0`
+ - Fixes [#11](https://github.com/supabase-community/storage-csharp/issues/11) - Which implements
+ missing `SupabaseStorageException` on failure status codes for `Upload`, `Download`, `Move`, `CreateSignedUrl`
+ and `CreateSignedUrls`.
+
+## 0.13.0 - 2023-08-26
+
+- Update dependency: `gotrue-csharp@4.2.1`
+ - [#74](https://github.com/supabase-community/gotrue-csharp/pull/74) - Fixes bug where token refresh interval was
+ not honored by client. Thanks [@slater1](https://github.com/slater1)!
+ - **Minor Breaking changes:** [#72](https://github.com/supabase-community/gotrue-csharp/pull/72) - Fixes
+ Calling `SetAuth` does not actually set Authorization Headers for subsequent requests by implementing `SetSession`
+ - Removes `RefreshToken(string refreshToken)` and `SetAuth(string accessToken` in favor
+ of `SetSession(string accessToken, string refreshToken)`
+ - Makes `RefreshAccessToken` require `accessToken` and `refreshToken` as parameters - overrides the
+ authorization
+ headers to use the supplied token
+ - Migrates project internal times to use `DateTime.UtcNow` over `DateTime.Now`.
+
+## 0.12.2 - 2023-07-28
+
+- Update dependency: `realtime-csharp@6.0.4`
+ - Fixes [#29](https://github.com/supabase-community/realtime-csharp/issues/29) Where the Realtime client could
+ disconnect from channels after a few hours and fail to reconnect by removing the case where the `IsSubscribe` flag
+ is flipped when encountering a channel error.
+- Update dependency: `postgrest-csharp@3.2.5`
+ - Re: [supabase-community/supabase-csharp#81](https://github.com/supabase-community/supabase-csharp/discussions/81):
+ Clarifies `ReferenceAttribute` by changing `shouldFilterTopLevel` to `useInnerJoin` and adds an additional
+ constructor for `ReferenceAttribute` with a shortcut for specifying the `JoinType`
+
+## 0.12.1 - 2023-06-29
+
+- Update dependency: `gotrue-csharp@4.1.1`
+ - [#68](https://github.com/supabase-community/gotrue-csharp/pull/68) Changes Network Status to use the interface
+ instead of client
+- Update dependency: `postgrest-csharp@3.2.4`
+ - [#70](https://github.com/supabase-community/postgrest-csharp/pull/70) Minor Unity related fixes
+
+## 0.12.0 - 2023-06-25
+
+- Update dependency: `gotrue-csharp@4.1.0`
+ - **Minor** [#66](https://github.com/supabase-community/gotrue-csharp/pull/66) - Separates out Admin JWT
+ functionality into a separate `AdminClient`
+ - [#67](https://github.com/supabase-community/gotrue-csharp/pull/67) - Adds shutdown method which terminates the
+ background refresh threads.
+ - Movement of much of the documentation for methods out of their classes and into their interfaces.
+ - Language features locked to C#9
+- Update dependency: `postgrest-csharp@3.2.3`
+ - [#69](https://github.com/supabase-community/postgrest-csharp/pull/69) Locks language version to C#9
+ - [#68](https://github.com/supabase-community/postgrest-csharp/pull/68) Makes RPC parameters optional
+
+Thanks [@wiverson](https://github.com/wiverson) for the work in this release!
+
+## 0.11.1 - 2023-06-10
+
+- Update dependencies: `functions-csharp@1.3.1`, `gotrue-csharp@4.0.4`, `postgrest-csharp@3.2.2`,
+ `realtime-csharp@6.0.3`, `supabase-storage-csharp@1.3.2`, `supabase-core@0.0.3`
+ - Namespaces assembly names to make them unique among other dependencies, i.e: `Core.dll`
+ becomes `Supabase.Core.dll` which will hopefully prevent future collisions.
+
+## 0.11.0 - 2023-05-24
+
+- Update dependency: postgrest-csharp@3.2.0
+ - General codebase and QOL improvements. Exceptions are generally thrown through `PostgrestException` now instead
+ of `Exception`. A `FailureHint.Reason` is provided with failures if possible to parse.
+ - `AddDebugListener` is now available on the client to help with debugging
+ - Merges [#65](https://github.com/supabase-community/postgrest-csharp/pull/65) Cleanup + Add better exception
+ handling
+ - Merges [#66](https://github.com/supabase-community/postgrest-csharp/pull/66) Local test Fixes
+ - Fixes [#67](https://github.com/supabase-community/postgrest-csharp/issues/67) Postgrest Reference attribute is
+ producing StackOverflow for circular references
+- Update dependency: gotrue-csharp@4.0.2
+ - [#58](https://github.com/supabase-community/gotrue-csharp/issues/58) - Add support for the `reauthentication`
+ endpoint which allows for secure password changes.
+- Update dependency: realtime-csharp@6.0.1
+ - Updates publishing action for future packages, includes README and icon.
+ - Merges [#28](https://github.com/supabase-community/realtime-csharp/pull/28)
+ and [#30](https://github.com/supabase-community/realtime-csharp/pull/30)
+ - The realtime client now takes a "fail-fast" approach. On establishing an initial connection, client will throw
+ a `RealtimeException` in `ConnectAsync()` if the socket server is unreachable. After an initial connection has
+ been
+ established, the **client will continue attempting reconnections indefinitely until disconnected.**
+ - [Major, New] C# `EventHandlers` have been changed to `delegates`. This should allow for cleaner event data access
+ over
+ the previous subclassed `EventArgs` setup. Events are scoped accordingly. For example, the `RealtimeSocket` error
+ handlers will receive events regarding socket connectivity; whereas the `RealtimeChannel` error handlers will
+ receive
+ events according to `Channel` joining/leaving/etc. This is implemented with the following methods prefixed by (
+ Add/Remove/Clear):
+ - `RealtimeBroadcast.AddBroadcastEventHandler`
+ - `RealtimePresence.AddPresenceEventHandler`
+ - `RealtimeSocket.AddStateChangedHandler`
+ - `RealtimeSocket.AddMessageReceivedHandler`
+ - `RealtimeSocket.AddHeartbeatHandler`
+ - `RealtimeSocket.AddErrorHandler`
+ - `RealtimeClient.AddDebugHandler`
+ - `RealtimeClient.AddStateChangedHandler`
+ - `RealtimeChannel.AddPostgresChangeHandler`
+ - `RealtimeChannel.AddMessageReceivedHandler`
+ - `RealtimeChannel.AddErrorHandler`
+ - `Push.AddMessageReceivedHandler`
+ - [Major, new] `ClientOptions.Logger` has been removed in favor of `Client.AddDebugHandler()` which allows for
+ implementing custom logging solutions if desired.
+ - A simple logger can be set up with the following:
+ ```c#
+ client.AddDebugHandler((sender, message, exception) => Debug.WriteLine(message));
+ ```
+ - [Major] `Connect()` has been marked `Obsolete` in favor of `ConnectAsync()`
+ - Custom reconnection logic has been removed in favor of using the built-in logic from `Websocket.Client@4.6.1`.
+ - Exceptions that are handled within this library have been marked as `RealtimeException`s.
+ - The local, docker-composed test suite has been brought back (as opposed to remotely testing on live supabase
+ servers)
+ to test against.
+ - Comments have been added throughout the entire codebase and an `XML` file is now generated on build.
+
+## 0.10.0 - 2023-05-14
+
+- Changes options to require `Supabase.SupabaseOptions.SessionPersistor` from using `ISupabaseSessionHandler`
+ to `IGotrueSessionPersistance` (these are now synchronous operations).
+- Update dependency: gotrue-csharp@4.0.1
+ - [#60](https://github.com/supabase-community/gotrue-csharp/pull/60) - Add interfaces, bug fixes, additional error
+ reason detection. Thanks [@wiverson](https://github.com/wiverson)!
+ - [#57](https://github.com/supabase-community/gotrue-csharp/pull/57) Refactor exceptions, code cleanup, and move to
+ delegate auth state changes
+ - Huge thank you to [@wiverson](https://github.com/wiverson) for his help on this refactor and release!
+ - Changes
+ - Exceptions have been simplified to a single `GotrueException`. A `Reason` field has been added
+ to `GotrueException` to clarify what happened. This should also be easier to manage as the Gotrue
+ server API & messages evolve.
+ - The session delegates for `Save`/`Load`/`Destroy` have been simplified to no longer require `async`.
+ - Console logging in a few places (most notable the background refresh thread) has been removed
+ in favor of a notification method. See `Client.AddDebugListener()` and the test cases for examples.
+ This will allow you to implement your own logging strategy (write to temp file, console, user visible
+ err console, etc).
+ - The client now more reliably emits AuthState changes.
+ - There is now a single source of truth for headers in the stateful Client - the `Options` headers.
+ - New feature:
+ - Added a `Settings` request to the stateless API only - you can now query the server instance to
+ determine if it's got the settings you need. This might allow for things like a visual
+ component in a tool to verify the GoTrue settings are working correctly, or tests that run differently
+ depending on the server configuration.
+ - Implementation notes:
+ - Test cases have been added to help ensure reliability of auth state change notifications
+ and persistence.
+ - Persistence is now managed via the same notifications as auth state change
+
+## 0.9.1 - 2023-04-28
+
+- Update dependency: gotrue-csharp@3.1.1
+ - Implements `SignInWithIdToken` for Apple/Google signing from LW7. A HUGE thank you
+ to [@wiverson](https://github.com/wiverson)!
+- Update dependency: realtime-csharp@5.0.5
+ - Re: [#27](https://github.com/supabase-community/realtime-csharp/issues/27) `PostgresChangesOptions` was not
+ setting `listenType` in constructor. Thanks [@Kuffs2205](https://github.com/Kuffs2205)
+- Update dependency: supabase-storage-csharp@1.2.10
+ - Re: [#7](https://github.com/supabase-community/storage-csharp/issues/7) Implements a `DownloadPublicFile` method.
+
+## 0.9.0 - 2023-04-12
+
+- Update dependency: gotrue-csharp@3.1.0
+
+ - [Minor] Implements PKCE auth flow. SignIn using a provider now returns an instance of `ProviderAuthState` rather
+ than a `string`.
+
+- Update dependency: supabase-storage-csharp@1.2.9
+ - Implements storage features from LW7:
+ - feat: custom file size limit and mime types at bucket
+ level [supabase/storage-js#151](https://github.com/supabase/storage-js/pull/151) file size and mime type
+ limits per bucket
+ - feat: quality option, image
+ transformation [supabase/storage-js#145](https://github.com/supabase/storage-js/pull/152) quality option for
+ image transformations
+ - feat: format option for webp
+ support [supabase/storage-js#142](https://github.com/supabase/storage-js/pull/142) format option for image
+ transformation
+
+## 0.8.8 - 2023-03-29
+
+- Update dependency: gotrue-csharp@3.0.6
+ - Supports adding `SignInOptions` (i.e. `RedirectTo`) on `OAuth Provider` SignIn requests.
+
+## 0.8.7 - 2023-03-23
+
+- Update dependency: realtime-csharp@5.0.4
+ - Re: [#26](https://github.com/supabase-community/realtime-csharp/pull/26) - Fixes Connect() not returning callback
+ result when the socket isn't null. Thanks [@BlueWaterCrystal](https://github.com/BlueWaterCrystal)!
+
+## 0.8.6 - 2023-03-23
+
+- Update dependency: supabase-storage-csharp@1.2.8
+ - [Merge #5](https://github.com/supabase-community/storage-csharp/pull/5) Added search string as an optional search
+ parameter. Thanks [@ElectroKnight22](https://github.com/ElectroKnight22)!
+
+## 0.8.5 - 2023-03-10
+
+- Update dependency: realtime-csharp@5.0.3
+ - Re: [#25](https://github.com/supabase-community/realtime-csharp/issues/25) - Support Channel being resubscribed
+ after having been unsubscribed, fixes rejoin timer being erroneously called on channel `Unsubscribe`.
+ Thanks [@Kuffs2205](https://github.com/Kuffs2205)!
+
+## 0.8.4 - 2023-03-03
+
+- Update dependency: supabase-storage-csharp@1.2.7
+ - Re: [#4](https://github.com/supabase-community/storage-csharp/issues/4) Implementation for `ClientOptions` which
+ supports specifying Upload, Download, and Request timeouts.
+- Update dependency: realtime-csharp@5.0.2
+ - Re: [#24](https://github.com/supabase-community/realtime-csharp/issues/24) - Fixes join failing until reconnect
+ happened + adds access token push on channel join. Big thank you to [@Honeyhead](https://github.com/honeyhead) for
+ the help debugging and identifying!
+
+## 0.8.3 - 2023-02-26
+
+- Update dependency: supabase-storage-csharp@1.2.5
+ - Provides fix
+ for [supabase-community/supabase-csharp#54](https://github.com/supabase-community/supabase-csharp/issues/54) -
+ Dynamic headers were always being overwritten by initialized token headers, so the storage client would not
+ receive user's access token as expected.
+ - Provides fix for upload progress not reporting
+ in [supabase-community/storage-csharp#3](https://github.com/supabase-community/storage-csharp/issues/3)
+- Update dependency: gotrue-csharp@3.0.5
+ - Fixes [#44](https://github.com/supabase-community/gotrue-csharp/issues/44) - refresh timer should automatically
+ reattempt (interval of 5s) for HTTP exceptions - gracefully exits on invalid refresh and triggers
+ an `AuthState.Changed` event
+
+## 0.8.2 - 2023-02-26
+
+- Update dependency: supabase-storage-csharp@1.2.4
+ - `UploadOrUpdate` now appropriately throws request exceptions
+
+## 0.8.1 - 2023-02-06
+
+- Update dependency: realtime-csharp@5.0.1
+ - Re: [#22](https://github.com/supabase-community/realtime-csharp/issues/22) - `SerializerSettings` were not being
+ passed to `PostgresChangesResponse` - Thanks [@Shenrak](https://github.com/Shenrak) for the help debugging!
+
+## 0.8.0 - 2023-01-31
+
+- Update dependency: realtime-csharp@5.0.0
+ - Re: [#21](https://github.com/supabase-community/realtime-csharp/pull/21) Provide API for `presence`, `broadcast`
+ and `postgres_changes`
+ - [Major, New] `Channel.PostgresChanges` event will receive the wildcard `*` changes event,
+ not `Channel.OnMessage`.
+ - [Major] `Channel.OnInsert`, `Channel.OnUpdate`, and `Channel.OnDelete` now conform to the server's payload
+ of `Response.Payload.**Data**`
+ - [Major] `Channel.OnInsert`, `Channel.OnUpdate`, and `Channel.OnDelete` now return `PostgresChangesEventArgs`
+ - [Minor] Rename `Channel` to `RealtimeChannel`
+ - Supports better handling of disconnects in `RealtimeSocket` and adds a `Client.OnReconnect` event.
+ - [Minor] Moves `ChannelOptions` to `Channel.ChannelOptions`
+ - [Minor] Moves `ChannelStateChangedEventArgs` to `Channel.ChannelStateChangedEventArgs`
+ - [Minor] Moves `Push` to `Channel.Push`
+ - [Minor] Moves `Channel.ChannelState` to `Constants.ChannelState`
+ - [Minor] Moves `SocketResponse`, `SocketRequest`, `SocketResponsePayload`, `SocketResponseEventArgs`,
+ and `SocketStateChangedEventArgs` to `Socket` namespace.
+ - [New] Adds `RealtimeBroadcast`
+ - [New] Adds `RealtimePresence`
+ - [Improvement] Better handling of disconnection/reconnection
+- Update dependency: postgrest-csharp@3.1.3
+ - Another fix for [#61](https://github.com/supabase-community/postgrest-csharp/issues/61) which futher typechecks
+ nullable values.
+
+## 0.7.2 - 2023-01-27
+
+- Update dependency: gotrue-csharp@3.0.4
+ - Makes `Session.CreatedAt` a publicly settable property, which should fix incorrect dates on retrieved `Session`s.
+- Update dependency: postgrest-csharp@3.1.2
+ - Fix [#61](https://github.com/supabase-community/postgrest-csharp/issues/61) which did not correctly parse
+ Linq `Where` when encountering a nullable type.
+ - Add missing support for transforming for `== null` and `!= null`
+
+## 0.7.1 - 2023-01-17
+
+- Update dependency: postgrest-csharp@3.1.1
+ - Fix issue from supabase-community/supabase-csharp#48 where boolean model properties would not be evaluated in
+ predicate expressions
+
+## 0.7.0 - 2023-01-16
+
+- Update dependency: postgrest-csharp@3.1.0
+ - [Minor] Breaking API Change: `PrimaryKey` attribute defaults to `shouldInsert: false` as most uses will have the
+ Database generate the primary key.
+ - Merged [#60](https://github.com/supabase-community/postgrest-csharp/pull/60) which Added linq support
+ for `Select`, `Where`, `OnConflict`, `Columns`, `Order`, `Update`, `Set`, and `Delete`
+
+## 0.6.2 - 2022-11-22
+
+- Update dependency: postgrest-csharp@3.0.4
+ - `GetHeaders` is now passed to `ModeledResponse` and `BaseModel` so that the default `Update` and `Delete` methods
+ use the latest credentials
+ - `GetHeaders` is used in `Rpc` calls (re: [#39](https://github.com/supabase-community/supabase-csharp/issues/39))
+
+## 0.6.1 - 2022-11-12
+
+- [Hotfix] `GetHeaders` was not passing properly to `SupabaseTable` and `Gotrue.Api`
+
+## 0.6.0 - 2022-11-12
+
+[BREAKING CHANGES]
+
+- `Client` is no longer a singleton, singleton interactions (if desired) are left to the developer to implement.
+- `Client` supports injection of dependent clients after initialization via property:
+ - `Auth`
+ - `Functions`
+ - `Realtime`
+ - `Postgrest`
+ - `Storage`
+- `SupabaseModel` contains no logic but remains for backwards compatibility. (Marked `Obsolete`)
+- `ClientOptions.ShouldInitializeRealtime` was removed (no longer auto initialized)
+- `ClientOptions` now references an `ISupabaseSessionHandler` which specifies expected functionality for session
+ persistence on Gotrue (replaces `ClientOptions.SessionPersistor`, `ClientOptions.SessionRetriever`,
+ and `ClientOptions.SessionDestroyer`).
+- `supabase-csharp` and all child libraries now have support `nullity`
+
+Other Changes:
+
+- Update dependency: functions-csharp@1.2.1
+- Update dependency: gotrue-csharp@3.0.2
+- Update dependency: postgrest-csharp@3.0.2
+- Update dependency: realtime-csharp@4.0.1
+- Update dependency: supabase-storage-csharp@1.2.3
+- Update dependency: supabase-core@0.0.2
+
+Big thank you to [@veleek](https://github.com/veleek) for his insight into these changes.
+
+Re: [#35](https://github.com/supabase-community/supabase-csharp/issues/35), [#34](https://github.com/supabase-community/supabase-csharp/issues/34), [#23](https://github.com/supabase-community/supabase-csharp/issues/23), [#36](https://github.com/supabase-community/supabase-csharp/pull/36)
+
+## 0.5.3 - 2022-10-11
+
+- Update dependency: postgrest-csharp@2.1.0
+ - [Minor] Breaking API change: Remove `BaseModel.PrimaryKeyValue` and `BaseModel.PrimaryKeyColumn` in favor of
+ a `PrimaryKey` dictionary with support for composite keys.
+ - Re: [#48](https://github.com/supabase-community/postgrest-csharp/issues/48) - Add support for derived models
+ on `ReferenceAttribute`
+ - Re: [#49](https://github.com/supabase-community/postgrest-csharp/issues/49) - Added `Match(T model)`
+
+## 0.5.2 - 2022-9-13
+
+- Update dependency: postgrest-csharp@2.0.12
+ - Merged [#47](https://github.com/supabase-community/postgrest-csharp/pull/49) which added cancellation token
+ support to `Table` methods. Thanks [@devpikachu](https://github.com/devpikachu)!
+
+## 0.5.1 - 2022-8-1
+
+- Update dependency: postgrest-csharp@2.0.11
+- Update dependency: supabase-storage-csharp@1.1.1
+
+## 0.5.0 - 2022-7-17
+
+- Update dependency: postgrest-csharp@2.0.9
+- Update dependency: realtime-csharp@3.0.1
+- Update dependency: supabase-storage-csharp@1.1.0
+ - API Change [Breaking/Minor] Library no longer uses `WebClient` and instead leverages `HttpClient`. Progress events
+ on `Upload` and `Download` are now handled with `EventHandler` instead of `WebClient` EventHandlers.
+
+## 0.4.4 - 2022-5-24
+
+- Update dependency: gotrue-csharp@2.4.5
+- Update dependency: postgrest-csharp@2.0.8
+
+## 0.4.3 - 2022-5-13
+
+- Update dependency: gotrue-csharp@2.4.4
+
+## 0.4.2 - 2022-4-30
+
+- Update dependency: gotrue-csharp@2.4.3
+
+## 0.4.1 - 2022-4-23
+
+- Update dependency: gotrue-csharp@2.4.2
+
+## 0.4.0 - 2022-4-12
+
+- Add support for functions-csharp@1.0.1, giving access to invoking Supabase's edge functions.
+- Update dependency: gotrue-csharp@2.4.1
+
+## 0.3.5 - 2022-4-11
+
+- Update dependency: postgres-csharp@2.0.7
+
+## 0.3.4 - 2022-03-28
+
+- Update dependency: gotrue-csharp@2.4.0
+
+## 0.3.3 - 2022-02-27
+
+- Update dependency: gotrue-csharp@2.3.6
+- Update dependency: supabase-storage-csharp@1.0.2
+
+## 0.3.2 - 2022-02-18
+
+- Update dependency: realtime-csharp@3.0.0
+ - Exchange existing websocket client: [WebSocketSharp](https://github.com/sta/websocket-sharp)
+ for [Marfusios/websocket-client](https://github.com/Marfusios/websocket-client) which adds support for Blazor WASM
+ apps.
+ Ref: [#14](https://github.com/supabase-community/realtime-csharp/pull/14)
+
+## 0.3.1 - 2022-01-20
+
+- Update dependency: gotrue-csharp@2.3.5
+ - [#23](https://github.com/supabase-community/gotrue-csharp/pull/23) Added `redirect_url` option for MagicLink sign
+ in (Thanks [@MisterJimson](https://github.com/MisterJimson))
+ - [#21](https://github.com/supabase-community/gotrue-csharp/pull/21) Added SignOut method to Stateless Client (
+ Thanks [@fplaras](https://github.com/fplaras))
+
+## 0.3.0 - 2021-12-30
+
+- Update dependency: postgrest-csharp@2.0.6
+ - Add support for `NullValueHandling` to be specified on a `Column` Attribute and for it to be honored on Inserts
+ and Updates. Defaults to: `NullValueHandling.Include`.
+ - Implements [#38](https://github.com/supabase-community/postgrest-csharp/issues/38)
+- Update dependency: realtime-csharp@2.0.8
+ - Implement Upstream Realtime RLS Error Broadcast Handler
+ - Implements [#12](https://github.com/supabase-community/realtime-csharp/issues/12)
+ - `SocketResponse` now exposes a method: `OldModel`, that hydrates the `OldRecord` property into a model.
+
+## 0.2.12 - 2021-12-29
+
+- Update dependency: gotrue-csharp@2.3.3
+ - `SignUp` will return a `Session` with a _populated `User` object_ on an unconfirmed signup.
+ - Fixes [#19](https://github.com/supabase-community/gotrue-csharp/issues/19)
+ - Developers who were using a `null` check on `Session.User` will need to adjust accordingly.
+- Update dependency: postgrest-csharp@2.0.5
+ - Fix for [#37](https://github.com/supabase-community/postgrest-csharp/issues/37) - Return Type `minimal` would fail
+ to resolve because of incorrect `Accept` headers. Added header and test to verify for future.
+ - Fix for [#36](https://github.com/supabase-community/postgrest-csharp/issues/36) - Inserting/Upserting bulk records
+ would fail while doing an unnecessary generic coercion.
+
+## 0.2.11 - 2021-12-24
+
+- Update dependency: gotrue-csharp@2.3.2 (changes CreateUser parameters to conform to `AdminUserAttributes`)
+ - See [#15](https://github.com/supabase-community/supabase-csharp/issues/15)
+ - See [#16](https://github.com/supabase-community/supabase-csharp/issues/16)
+- Update dependency: realtime-csharp@2.0.7
+ - See [#13](https://github.com/supabase-community/supabase-csharp/issues/13)
+
+## 0.2.10 - 2021-12-23
+
+- Update dependency: gotrue-csharp@2.3.0 (adds metadata support for user signup,
+ see [#14](https://github.com/supabase/community/issues/14))
+
+## 0.2.9 - 2021-12-9
+
+- Separate Storage client from Supabase repo and into `storage-csharp`, `supabase-csharp` now references new repo.
+
+## 0.2.8 - 2021-12-4
+
+- Update gotrue-csharp to 2.2.4
+ - Adds support for `ListUsers` (paginate, sort, filter), `GetUserById`, `CreateUser`, and `UpdateById`
+
+## 0.2.7 - 2021-12-2
+
+- Update gotrue-csharp to 2.2.3
+ - Adds support for sending password resets to users.
+
+## 0.2.6 - 2021-11-29
+
+- Support for [#12](https://github.com/supabase-community/supabase-csharp/issues/12)
+- Update realtime-csharp to 2.0.6
+- Update gotrue-csharp to 2.2.2
+- Add `StatelessClient` re:[#7](https://github.com/supabase-community/supabase-csharp/issues/7)
diff --git a/apps/docs/layouts/MainSkeleton.tsx b/apps/docs/layouts/MainSkeleton.tsx
index ed0fef5cc36..8fc3608bfda 100644
--- a/apps/docs/layouts/MainSkeleton.tsx
+++ b/apps/docs/layouts/MainSkeleton.tsx
@@ -96,6 +96,10 @@ const levelsData = {
icon: 'reference-csharp',
name: 'C# Reference v0.0',
},
+ reference_csharp_v1: {
+ icon: 'reference-csharp',
+ name: 'C# Reference v1.0',
+ },
reference_python_v2: {
icon: 'reference-python',
name: 'Python Reference v2.0',
diff --git a/apps/docs/pages/reference/csharp/[...slug].tsx b/apps/docs/pages/reference/csharp/[...slug].tsx
index 77dba701704..6bc8b054195 100644
--- a/apps/docs/pages/reference/csharp/[...slug].tsx
+++ b/apps/docs/pages/reference/csharp/[...slug].tsx
@@ -1,5 +1,5 @@
import clientLibsCommonSections from '~/spec/common-client-libs-sections.json'
-import spec from '~/spec/supabase_csharp_v0.yml' assert { type: 'yml' }
+import spec from '~/spec/supabase_csharp_v1.yml' assert { type: 'yml' }
import RefSectionHandler from '~/components/reference/RefSectionHandler'
import { flattenSections } from '~/lib/helpers'
import handleRefGetStaticPaths from '~/lib/mdx/handleRefStaticPaths'
@@ -12,7 +12,7 @@ const libraryPath = '/csharp'
export default function CSharpReference(props) {
return (
diff --git a/apps/docs/spec/common-client-libs-sections.json b/apps/docs/spec/common-client-libs-sections.json
index 6a44fb3c877..b563968d1c1 100644
--- a/apps/docs/spec/common-client-libs-sections.json
+++ b/apps/docs/spec/common-client-libs-sections.json
@@ -32,6 +32,7 @@
"reference_dart_v2",
"reference_python_v2",
"reference_csharp_v0",
+ "reference_csharp_v1",
"reference_swift_v1",
"reference_swift_v2",
"reference_kotlin_v1",
@@ -48,6 +49,7 @@
"reference_dart_v1",
"reference_python_v2",
"reference_csharp_v0",
+ "reference_csharp_v1",
"reference_swift_v1",
"reference_swift_v2",
"reference_kotlin_v1",
@@ -986,7 +988,6 @@
"reference_dart_v1",
"reference_dart_v2",
"reference_python_v2",
- "reference_csharp_v0",
"reference_swift_v1",
"reference_swift_v2",
"reference_kotlin_v1",
diff --git a/apps/docs/spec/supabase_csharp_v0.yml b/apps/docs/spec/supabase_csharp_v0.yml
index e09549dafbb..914c3341808 100644
--- a/apps/docs/spec/supabase_csharp_v0.yml
+++ b/apps/docs/spec/supabase_csharp_v0.yml
@@ -22,7 +22,7 @@ functions:
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.
+ `Supabase` 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.
diff --git a/apps/docs/spec/supabase_csharp_v1.yml b/apps/docs/spec/supabase_csharp_v1.yml
new file mode 100644
index 00000000000..0c127b9c639
--- /dev/null
+++ b/apps/docs/spec/supabase_csharp_v1.yml
@@ -0,0 +1,1597 @@
+openref: 0.1
+
+info:
+ id: reference/csharp
+ title: Supabase C# Client
+ description: |
+
+ Supabase C#.
+
+ definition: spec/enrichments/tsdoc_v2/combined.json
+ slugPrefix: '/'
+ specUrl: https://github.com/supabase/supabase/edit/master/apps/docs/spec/supabase_csharp_v1.yml
+ libraries:
+ - name: 'C#'
+ id: 'csharp'
+ version: '1.0.0'
+
+functions:
+ - id: initializing
+ title: Initializing
+ description: |
+ 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` 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.
+
+ examples:
+ - id: csharp-init-standard
+ name: Standard
+ code: |
+ ```c#
+ 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();
+ ```
+ - id: csharp-init-maui
+ name: Dependency Injection (Maui-like)
+ code: |
+ ```c#
+ public static MauiApp CreateMauiApp()
+ {
+ // ...
+ var builder = MauiApp.CreateBuilder();
+
+ var url = Environment.GetEnvironmentVariable("SUPABASE_URL");
+ var key = Environment.GetEnvironmentVariable("SUPABASE_KEY");
+ var options = new SupabaseOptions
+ {
+ AutoRefreshToken = true,
+ AutoConnectRealtime = true,
+ // SessionHandler = new SupabaseSessionHandler() <-- This must be implemented by the developer
+ };
+
+ // Note the creation as a singleton.
+ builder.Services.AddSingleton(provider => new Supabase.Client(url, key, options));
+ }
+ ```
+ - id: csharp-init-showing-models
+ name: With Models Example
+ code: |
+ ```c#
+ // Given the following Model representing the Supabase Database (Message.cs)
+ [Table("messages")]
+ public class Message : BaseModel
+ {
+ [PrimaryKey("id")]
+ public int Id { get; set; }
+
+ [Column("username")]
+ public string UserName { get; set; }
+
+ [Column("channel_id")]
+ public int ChannelId { get; set; }
+
+ public override bool Equals(object obj)
+ {
+ return obj is Message message &&
+ Id == message.Id;
+ }
+
+ public override int GetHashCode()
+ {
+ return HashCode.Combine(Id);
+ }
+ }
+
+ void Initialize()
+ {
+ // Get All Messages
+ var response = await client.Table().Get();
+ List models = response.Models;
+
+ // Insert
+ var newMessage = new Message { UserName = "acupofjose", ChannelId = 1 };
+ await client.Table().Insert();
+
+ // Update
+ var model = response.Models.First();
+ model.UserName = "elrhomariyounes";
+ await model.Update();
+
+ // Delete
+ await response.Models.Last().Delete();
+
+ // etc.
+ }
+ ```
+ - id: sign-up
+ title: 'SignUp()'
+ description: |
+ Creates a new user.
+ notes: |
+ - By default, the user needs to verify their email address before logging in. To turn this off, disable **Confirm email** in [your project](https://supabase.com/dashboard/project/_/auth/providers).
+ - **Confirm email** determines if users need to confirm their email address after signing up.
+ - If **Confirm email** is enabled, a `user` is returned but `session` is null.
+ - If **Confirm email** is disabled, both a `user` and a `session` are returned.
+ - When the user confirms their email address, they are redirected to the [`SITE_URL`](https://supabase.com/docs/guides/auth/concepts/redirect-urls) by default. You can modify your `SITE_URL` or add additional redirect URLs in [your project](https://supabase.com/dashboard/project/_/auth/url-configuration).
+ - If SignUp() is called for an existing confirmed user:
+ - When both **Confirm email** and **Confirm phone** (even when phone provider is disabled) are enabled in [your project](/dashboard/project/_/auth/providers), an obfuscated/fake user object is returned.
+ - When either **Confirm email** or **Confirm phone** (even when phone provider is disabled) is disabled, the error message, `User already registered` is returned.
+ examples:
+ - id: sign-up
+ name: Sign up.
+ isSpotlight: true
+ code: |
+ ```c#
+ var session = await supabase.Auth.SignUp(email, password);
+ ```
+ - id: sign-in-with-password
+ title: 'SignIn(email, password)'
+ description: |
+ Log in an existing user using email or phone number with password.
+ notes: |
+ - Requires either an email and password or a phone number and password.
+ examples:
+ - id: sign-in-with-email-and-password
+ name: Sign in with email and password
+ isSpotlight: true
+ code: |
+ ```c#
+ var session = await supabase.Auth.SignIn(email, password);
+ ```
+ - id: sign-in-with-phone-and-password
+ name: Sign in with phone and password
+ code: |
+ ```c#
+ var session = await supabase.Auth.SignIn(SignInType.Phone, phoneNumber, password);
+ ```
+ - id: sign-in-with-otp
+ title: 'SendMagicLink() and SignIn(SignInType, Phone)'
+ notes: |
+ - Requires either an email or phone number.
+ - This method is used for passwordless sign-ins where a OTP is sent to the user's email or phone number.
+ - If you're using an email, you can configure whether you want the user to receive a magiclink or a OTP.
+ - If you're using phone, you can configure whether you want the user to receive a OTP.
+ - The magic link's destination URL is determined by the [`SITE_URL`](https://supabase.com/docs/guides/auth/concepts/redirect-urls). You can modify the `SITE_URL` or add additional redirect urls in [your project](https://supabase.com/dashboard/project/_/auth/settings).
+ examples:
+ - id: sign-in-with-email
+ name: Send Magic Link.
+ isSpotlight: true
+ description: |
+ The user will be sent an email which contains either a magiclink or a OTP or both. By default, a given user can only request a OTP once every 60 seconds.
+ You can pass `emailRedirectTo` with dynamic link to bring the users back to your app after they click on the magic link.
+ code: |
+ ```c#
+ var options = new SignInOptions { RedirectTo = "http://myredirect.example" };
+ var didSendMagicLink = await supabase.Auth.SendMagicLink("joseph@supabase.io", options);
+ ```
+ - id: sign-in-with-sms-otp
+ name: Sign in with SMS OTP.
+ description: The user will be sent a SMS which contains a OTP. By default, a given user can only request a OTP once every 60 seconds.
+ code: |
+ ```c#
+ await supabase.Auth.SignIn(SignInType.Phone, "+13334445555");
+
+ // Paired with `VerifyOTP` to get a session
+ var session = await supabase.Auth.VerifyOTP("+13334445555", TOKEN, MobileOtpType.SMS);
+ ```
+ - id: sign-in-with-oauth
+ title: 'SignIn(Provider)'
+ description: |
+ Signs the user in using third party OAuth providers.
+ notes: |
+ - This method is used for signing in using a third-party provider.
+ - Supabase supports many different [third-party providers](https://supabase.com/docs/guides/auth#providers).
+ examples:
+ - id: sign-in-using-a-third-party-provider
+ name: Sign in using a third-party provider
+ isSpotlight: true
+ code: |
+ ```c#
+ var signInUrl = supabase.Auth.SignIn(Provider.Github);
+ ```
+ - id: sign-in-with-scopes
+ name: With scopes
+ description: |
+ If you need additional data from an OAuth provider, you can include a space-separated list of scopes in your request to get back an OAuth provider token.
+ You may also need to specify the scopes in the provider's OAuth app settings, depending on the provider.
+ code: |
+ ```c#
+ var signInUrl = supabase.Auth.SignIn(Provider.Github, 'repo gist notifications');
+
+ // after user comes back from signin flow
+ var session = supabase.Auth.GetSessionFromUrl(REDIRECTED_URI);
+ ```
+ - id: sign-out
+ title: 'SignOut()'
+ description: |
+ Signs out the current user, if there is a logged in user.
+ notes: |
+ - In order to use the `SignOut()` method, the user needs to be signed in first.
+ examples:
+ - id: sign-out
+ name: Sign out
+ isSpotlight: true
+ code: |
+ ```c#
+ await supabase.Auth.SignOut();
+ ```
+ - id: verify-otp
+ title: 'VerifyOtp()'
+ notes: |
+ - The `VerifyOtp` method takes in different verification types. If a phone number is used, the type can either be `sms` or `phone_change`. If an email address is used, the type can be one of the following: `signup`, `magiclink`, `recovery`, `invite` or `email_change`.
+ - The verification type used should be determined based on the corresponding auth method called before `VerifyOtp` to sign up / sign-in a user.
+ examples:
+ - id: verify-sms-one-time-password(otp)
+ name: Verify Sms One-Time Password (OTP)
+ isSpotlight: true
+ code: |
+ ```c#
+ var session = await supabase.Auth.VerifyOTP("+13334445555", TOKEN, MobileOtpType.SMS);
+ ```
+ - id: get-session
+ title: 'CurrentSession'
+ description: |
+ Returns the session data, if there is an active session.
+ examples:
+ - id: get-the-session-data
+ name: Get the session data
+ isSpotlight: true
+ code: |
+ ```c#
+ var session = supabase.Auth.CurrentSession;
+ ```
+ - id: get-user
+ title: 'CurrentUser'
+ description: |
+ Returns the user data, if there is a logged in user.
+ examples:
+ - name: Get the logged in user
+ isSpotlight: true
+ code: |
+ ```c#
+ var user = supabase.Auth.CurrentUser;
+ ```
+ - id: update-user
+ title: 'UpdateUser()'
+ description: |
+ Updates user data, if there is a logged in user.
+ notes: |
+ - In order to use the `UpdateUser()` method, the user needs to be signed in first.
+ - By Default, email updates sends a confirmation link to both the user's current and new email.
+ To only send a confirmation link to the user's new email, disable **Secure email change** in your project's [email auth provider settings](https://supabase.com/dashboard/project/_/auth/settings).
+ examples:
+ - id: update-the-email-for-an-authenticated-user
+ name: Update the email for an authenticated user
+ description: Sends a "Confirm Email Change" email to the new email address.
+ isSpotlight: true
+ code: |
+ ```c#
+ var attrs = new UserAttributes { Email = "new-email@example.com" };
+ var response = await supabase.Auth.Update(attrs);
+ ```
+ - id: update-the-password-for-an-authenticated-user
+ name: Update the password for an authenticated user
+ isSpotlight: false
+ code: |
+ ```c#
+ var attrs = new UserAttributes { Password = "***********" };
+ var response = await supabase.Auth.Update(attrs);
+ ```
+ - id: update-the-users-metadata
+ name: Update the user's metadata
+ isSpotlight: true
+ code: |
+ ```c#
+ var attrs = new UserAttributes
+ {
+ Data = new Dictionary { {"example", "data" } }
+ };
+ var response = await supabase.Auth.Update(attrs);
+ ```
+ - id: on-auth-state-change
+ title: 'StateChanged'
+ description: |
+ Receive a notification every time an auth event happens.
+ notes: |
+ - Types of auth events: `AuthState.SignedIn`, `AuthState.SignedOut`, `AuthState.UserUpdated`, `AuthState.PasswordRecovery`, `AuthState.TokenRefreshed`
+ examples:
+ - id: listen-to-auth-changes
+ name: Listen to auth changes
+ isSpotlight: true
+ code: |
+ ```c#
+ supabase.Auth.AddStateChangedListener((sender, changed) =>
+ {
+ switch (changed)
+ {
+ case AuthState.SignedIn:
+ break;
+ case AuthState.SignedOut:
+ break;
+ case AuthState.UserUpdated:
+ break;
+ case AuthState.PasswordRecovery:
+ break;
+ case AuthState.TokenRefreshed:
+ break;
+ }
+ });
+ ```
+ - id: auth-reset-password-for-email
+ title: 'ResetPasswordForEmail()'
+ description: |
+ Sends a reset request to an email address.
+ notes: |
+ Sends a password reset request to an email address. When the user clicks the reset link in the email they are redirected back to your application. Prompt the user for a new password and call Auth.UpdateUser():
+
+ examples:
+ - id: reset-password
+ name: Reset password for Flutter
+ isSpotlight: true
+ code: |
+ ```c#
+ await supabase.Auth.ResetPasswordForEmail("joseph@supabase.io");
+ ```
+ - id: invoke
+ title: 'invoke()'
+ description: |
+ Invokes a Supabase Function. See the [guide](/docs/guides/functions) for details on writing Functions.
+ notes: |
+ - Requires an Authorization header.
+ - Invoke params generally match the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) spec.
+ examples:
+ - id: basic-invocation
+ name: Basic invocation.
+ isSpotlight: true
+ code: |
+ ```c#
+ var options = new InvokeFunctionOptions
+ {
+ Headers = new Dictionary {{ "Authorization", "Bearer 1234" }},
+ Body = new Dictionary { { "foo", "bar" } }
+ };
+
+ await supabase.Functions.Invoke("hello", options: options);
+ ```
+ - id: modeled-invocation
+ name: Modeled invocation
+ code: |
+ ``` c#
+ class HelloResponse
+ {
+ [JsonProperty("name")]
+ public string Name { get; set; }
+ }
+
+ await supabase.Functions.Invoke("hello");
+ ```
+ - id: select
+ description: |
+ Performs vertical filtering with SELECT.
+ title: 'Fetch data: Select()'
+ notes: |
+ - **LINQ expressions do not currently support parsing embedded resource columns. For these cases, `string` will need to be used.**
+ - **When using string Column Names to select, they must match names in database, not names specified on model properties.**
+ - Additional information on modeling + querying Joins and Inner Joins can be found [in the `postgrest-csharp README`](https://github.com/supabase-community/postgrest-csharp/blob/master/README.md#foreign-keys-join-tables-and-relationships)
+ - By default, Supabase projects will return a maximum of 1,000 rows. This setting can be changed in Project API Settings. It's recommended that you keep it low to limit the payload size of accidental or malicious requests. You can use `range()` queries to paginate through your data.
+ - `From()` can be combined with [Modifiers](/docs/reference/csharp/using-modifiers)
+ - `From()` can be combined with [Filters](/docs/reference/csharp/using-filters)
+ - If using the Supabase hosted platform `apikey` is technically a reserved keyword, since the API gateway will pluck it out for authentication. [It should be avoided as a column name](https://github.com/supabase/supabase/issues/5465).
+ examples:
+ - id: getting-your-data
+ name: Getting your data
+ isSpotlight: true
+ code: |
+ ```c#
+ // Given the following Model (City.cs)
+ [Table("cities")]
+ class City : BaseModel
+ {
+ [PrimaryKey("id")]
+ public int Id { get; set; }
+
+ [Column("name")]
+ public string Name { get; set; }
+
+ [Column("country_id")]
+ public int CountryId { get; set; }
+
+ //... etc.
+ }
+
+ // A result can be fetched like so.
+ var result = await supabase.From().Get();
+ var cities = result.Models
+ ```
+ - id: selecting-specific-columns
+ name: Selecting specific columns
+ description: You can select specific fields from your tables.
+ code: |
+ ```c#
+ // Given the following Model (Movie.cs)
+ [Table("movies")]
+ class Movie : BaseModel
+ {
+ [PrimaryKey("id")]
+ public int Id { get; set; }
+
+ [Column("name")]
+ public string Name { get; set; }
+
+ [Column("created_at")]
+ public DateTime CreatedAt { get; set; }
+
+ //... etc.
+ }
+
+ // A result can be fetched like so.
+ var result = await supabase
+ .From()
+ .Select(x => new object[] {x.Name, x.CreatedAt})
+ .Get();
+ ```
+ - id: query-foreign-tables
+ name: Query foreign tables
+ description: If your database has relationships, you can query related tables too.
+ code: |
+ ```c#
+ var data = await supabase
+ .From()
+ .Select("id, supplier:supplier_id(name), purchaser:purchaser_id(name)")
+ .Get();
+ ```
+ - id: filtering-with-inner-joins
+ name: Filtering with inner joins
+ description: |
+ If you want to filter a table based on a child table's values you can use the `!inner()` function. For example, if you wanted
+ to select all rows in a `message` table which belong to a user with the `username` "Jane":
+ code: |
+ ```c#
+ var result = await supabase
+ .From()
+ .Select("*, users!inner(*)")
+ .Filter("user.username", Operator.Equals, "Jane")
+ .Get();
+ ```
+ - id: querying-with-count-option
+ name: Querying with count option
+ description: |
+ You can get the number of rows by using the count option.
+ Allowed values for count option are [exact](https://postgrest.org/en/stable/api.html#exact-count), [planned](https://postgrest.org/en/stable/api.html#planned-count) and [estimated](https://postgrest.org/en/stable/api.html#estimated-count).
+ code: |
+ ```c#
+ var count = await supabase
+ .From()
+ .Select(x => new object[] { x.Name })
+ .Count(CountType.Exact);
+ ```
+ - id: querying-json-data
+ name: Querying JSON data
+ description: |
+ If you have data inside of a JSONB column, you can apply select
+ and query filters to the data values. Postgres offers a
+ [number of operators](https://www.postgresql.org/docs/current/functions-json.html)
+ for querying JSON data. Also see
+ [PostgREST docs](http://postgrest.org/en/v7.0.0/api.html#json-columns) for more details.
+ code: |
+ ```c#
+ var result = await supabase
+ .From()
+ .Select("id, name, address->street")
+ .Filter("address->postcode", Operator.Equals, 90210)
+ .Get();
+ ```
+
+ - id: insert
+ description: |
+ Performs an INSERT into the table.
+ title: 'Create data: Insert()'
+ examples:
+ - id: create-a-record
+ name: Create a record
+ isSpotlight: true
+ code: |
+ ```c#
+ [Table("cities")]
+ class City : BaseModel
+ {
+ [PrimaryKey("id", false)]
+ public int Id { get; set; }
+
+ [Column("name")]
+ public string Name { get; set; }
+
+ [Column("country_id")]
+ public int CountryId { get; set; }
+ }
+
+ var model = new City
+ {
+ Name = "The Shire",
+ CountryId = 554
+ };
+
+ await supabase.From().Insert(model);
+ ```
+ - id: bulk-create
+ name: Bulk create
+ code: |
+ ```c#
+ [Table("cities")]
+ class City : BaseModel
+ {
+ [PrimaryKey("id", false)]
+ public int Id { get; set; }
+
+ [Column("name")]
+ public string Name { get; set; }
+
+ [Column("country_id")]
+ public int CountryId { get; set; }
+ }
+
+ var models = new List
+ {
+ new City { Name = "The Shire", CountryId = 554 },
+ new City { Name = "Rohan", CountryId = 553 },
+ };
+
+ await supabase.From().Insert(models);
+ ```
+ - id: fetch-inserted-data
+ name: Fetch inserted record
+ code: |
+ ```c#
+ var result = await supabase
+ .From()
+ .Insert(models, new QueryOptions { Returning = ReturnType.Representation });
+ ```
+
+ - id: update
+ description: |
+ Performs an UPDATE on the table.
+ title: 'Modify data: Update()'
+ notes: |
+ - `Update()` is typically called using a model as an argument or from a hydrated model.
+ examples:
+ - id: updating-your-data-with-filter
+ name: Update your data using Filter
+ isSpotlight: true
+ code: |
+ ```c#
+ var update = await supabase
+ .From()
+ .Where(x => x.Name == "Auckland")
+ .Set(x => x.Name, "Middle Earth")
+ .Update();
+ ```
+ - id: updating-your-data
+ name: Update your data
+ code: |
+ ```c#
+ var model = await supabase
+ .From()
+ .Where(x => x.Name == "Auckland")
+ .Single();
+
+ model.Name = "Middle Earth";
+
+ await model.Update();
+ ```
+
+ - id: upsert
+ description: |
+ Performs an UPSERT into the table.
+ title: 'Upsert data: Upsert()'
+ notes: |
+ - 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](https://github.com/PostgREST/postgrest/issues/1118) for surrogate primary keys.
+ examples:
+ - id: upsert-your-data
+ name: Upsert your data
+ isSpotlight: true
+ code: |
+ ```c#
+ var model = new City
+ {
+ Id = 554,
+ Name = "Middle Earth"
+ };
+
+ await supabase.From().Upsert(model);
+ ```
+ - id: upserting-into-tables-with-constraints
+ name: Upserting into tables with constraints
+ description: |
+ Running the following will cause supabase to upsert data into the `users` table.
+ If the username 'supabot' already exists, the `onConflict` argument tells supabase to overwrite that row
+ based on the column passed into `onConflict`.
+ isSpotlight: true
+ code: |
+ ```c#
+ var model = new City
+ {
+ Id = 554,
+ Name = "Middle Earth"
+ };
+
+ await supabase
+ .From()
+ .OnConflict(x => x.Name)
+ .Upsert(model);
+ ```
+ - id: return-the-exact-number-of-rows
+ name: Return the exact number of rows
+ description: |
+ Allowed values for count option are `exact`, `planned` and `estimated`.
+ code: |
+ ```c#
+ var model = new City
+ {
+ Id = 554,
+ Name = "Middle Earth"
+ };
+
+ await supabase
+ .From()
+ .Upsert(model, new QueryOptions { Count = QueryOptions.CountType.Exact });
+ ```
+
+ - id: delete
+ description: |
+ Performs a DELETE on the table.
+ title: 'Delete data: Delete()'
+ notes: |
+ - `Delete()` should always be combined with [Filters](/docs/reference/csharp/using-filters) to target the item(s) you wish to delete.
+ examples:
+ - id: delete-records
+ name: Delete records
+ isSpotlight: true
+ code: |
+ ```c#
+ await supabase
+ .From()
+ .Where(x => x.Id == 342)
+ .Delete();
+ ```
+
+ - id: rpc
+ title: 'Stored Procedures: Rpc()'
+ description: |
+ You can call stored procedures as a "Remote Procedure Call".
+
+ That's a fancy way of saying that you can put some logic into your database then call it from anywhere.
+ It's especially useful when the logic rarely changes - like password resets and updates.
+ examples:
+ - id: call-a-stored-procedure
+ name: Call a stored procedure
+ isSpotlight: true
+ description: This is an example invoking a stored procedure.
+ code: |
+ ```c#
+ await supabase.Rpc("hello_world", null);
+ ```
+ - id: with-parameters
+ name: With Parameters
+ code: |
+ ```c#
+ await supabase.Rpc("hello_world", new Dictionary { { "foo", "bar"} });
+ ```
+
+ - id: subscribe
+ title: 'Realtime.Channel'
+ description: |
+ Subscribe to realtime changes in your database.
+ notes: |
+ - Realtime is disabled by default for new Projects for better database performance and security. You can turn it on by [managing replication](/docs/guides/api#managing-realtime).
+ - If you want to receive the "previous" data for updates and deletes, you will need to set `REPLICA IDENTITY` to `FULL`, like this: `ALTER TABLE your_table REPLICA IDENTITY FULL;`
+ examples:
+ - id: listen-to-broadcast
+ name: Listen to broadcast messages
+ isSpotlight: true
+ code: |
+ ```c#
+ class CursorBroadcast : BaseBroadcast
+ {
+ [JsonProperty("cursorX")]
+ public int CursorX {get; set;}
+
+ [JsonProperty("cursorY")]
+ public int CursorY {get; set;}
+ }
+
+ var channel = supabase.Realtime.Channel("any");
+ var broadcast = channel.Register();
+ broadcast.AddBroadcastEventHandler((sender, baseBroadcast) =>
+ {
+ var response = broadcast.Current();
+ });
+
+ await channel.Subscribe();
+
+ // Send a broadcast
+ await broadcast.Send("cursor", new CursorBroadcast { CursorX = 123, CursorY = 456 });
+ ```
+ - id: listen-to-presence-sync
+ name: Listen to presence sync
+ isSpotlight: true
+ code: |
+ ```c#
+ class UserPresence : BasePresence
+ {
+ [JsonProperty("cursorX")]
+ public bool IsTyping {get; set;}
+
+ [JsonProperty("onlineAt")]
+ public DateTime OnlineAt {get; set;}
+ }
+
+ var channel = supabase.Realtime.Channel("any");
+ var presenceKey = Guid.NewGuid().ToString();
+ var presence = channel.Register(presenceKey);
+ presence.AddPresenceEventHandler(EventType.Sync, (sender, type) =>
+ {
+ Debug.WriteLine($"The Event Type: {type}");
+ var state = presence.CurrentState;
+ });
+
+ await channel.Subscribe();
+
+ // Send a presence update
+ await presence.Track(new UserPresence { IsTyping = false, OnlineAt = DateTime.Now });
+ ```
+ - id: listening-to-a-specific-table
+ name: Listening to a specific table
+ isSpotlight: true
+ code: |
+ ```c#
+ await supabase.From().On(ListenType.All, (sender, change) =>
+ {
+ Debug.WriteLine(change.Payload.Data);
+ });
+ ```
+ - id: listen-to-all-database-changes
+ name: Listen to all database changes
+ code: |
+ ```c#
+ var channel = supabase.Realtime.Channel("realtime", "public", "*");
+
+ channel.AddPostgresChangeHandler(ListenType.All, (sender, change) =>
+ {
+ // The event type
+ Debug.WriteLine(change.Event);
+ // The changed record
+ Debug.WriteLine(change.Payload);
+ });
+
+ await channel.Subscribe();
+ ```
+ - id: listening-to-inserts
+ name: Listening to inserts
+ code: |
+ ```c#
+ await supabase.From().On(ListenType.Inserts, (sender, change) =>
+ {
+ Debug.WriteLine(change.Payload.Data);
+ });
+ ```
+ - id: listening-to-updates
+ name: Listening to updates
+ description: |
+ By default, Supabase will send only the updated record. If you want to receive the previous values as well you can
+ enable full replication for the table you are listening too:
+
+ ```sql
+ alter table "your_table" replica identity full;
+ ```
+ code: |
+ ```c#
+ await supabase.From().On(ListenType.Updates, (sender, change) =>
+ {
+ Debug.WriteLine(change.Payload.Data);
+ });
+ ```
+ - id: listening-to-deletes
+ name: Listening to deletes
+ description: |
+ By default, Supabase does not send deleted records. If you want to receive the deleted record you can
+ enable full replication for the table you are listening too:
+
+ ```sql
+ alter table "your_table" replica identity full;
+ ```
+ code: |
+ ```c#
+ await supabase.From().On(ListenType.Deletes, (sender, change) =>
+ {
+ Debug.WriteLine(change.Payload.Data);
+ });
+ ```
+ - id: listening-to-row-level-changes
+ name: Listening to row level changes
+ description: You can listen to individual rows using the format `{table}:{col}=eq.{val}` - where `{col}` is the column name, and `{val}` is the value which you want to match.
+ code: |
+ ```c#
+ var channel = supabase.Realtime.Channel("realtime", "public", "countries", "id", "id=eq.200");
+
+ channel.AddPostgresChangeHandler(ListenType.All, (sender, change) =>
+ {
+ // The event type
+ Debug.WriteLine(change.Event);
+ // The changed record
+ Debug.WriteLine(change.Payload);
+ });
+
+ await channel.Subscribe();
+ ```
+
+ - id: remove-channel
+ description: |
+ Unsubscribes and removes Realtime channel from Realtime client.
+ title: 'Unsubscribe()'
+ notes: |
+ - Removing a channel is a great way to maintain the performance of your project's Realtime service as well as your database if you're listening to Postgres changes. Supabase will automatically handle cleanup 30 seconds after a client is disconnected, but unused channels may cause degradation as more clients are simultaneously subscribed.
+ examples:
+ - id: removes-a-channel
+ name: Remove a channel
+ isSpotlight: true
+ code: |
+ ```c#
+ var channel = await supabase.From().On(ChannelEventType.All, (sender, change) => { });
+ channel.Unsubscribe();
+
+ // OR
+
+ var channel = supabase.Realtime.Channel("realtime", "public", "*");
+ channel.Unsubscribe()
+ ```
+
+ - id: get-channels
+ description: |
+ Returns all Realtime channels.
+ title: 'Subscriptions'
+ examples:
+ - id: get-all-channels
+ name: Get all channels
+ isSpotlight: true
+ code: |
+ ```c#
+ var channels = supabase.Realtime.Subscriptions;
+ ```
+
+ - id: list-buckets
+ description: |
+ Retrieves the details of all Storage buckets within an existing product.
+ title: 'ListBuckets()'
+ notes: |
+ - Policy permissions required:
+ - `buckets` permissions: `select`
+ - `objects` permissions: none
+ examples:
+ - id: list-buckets
+ name: List buckets
+ isSpotlight: true
+ code: |
+ ```c#
+ var buckets = await supabase.Storage.ListBuckets();
+ ```
+
+ - id: get-bucket
+ description: |
+ Retrieves the details of an existing Storage bucket.
+ title: 'GetBucket()'
+ notes: |
+ - Policy permissions required:
+ - `buckets` permissions: `select`
+ - `objects` permissions: none
+ examples:
+ - id: get-bucket
+ name: Get bucket
+ isSpotlight: true
+ code: |
+ ```c#
+ var bucket = await supabase.Storage.GetBucket("avatars");
+ ```
+
+ - id: create-bucket
+ description: |
+ Creates a new Storage bucket
+ title: 'CreateBucket()'
+ notes: |
+ - Policy permissions required:
+ - `buckets` permissions: `insert`
+ - `objects` permissions: none
+ examples:
+ - id: create-bucket
+ name: Create bucket
+ isSpotlight: true
+ code: |
+ ```c#
+ var bucket = await supabase.Storage.CreateBucket("avatars");
+ ```
+
+ - id: empty-bucket
+ description: |
+ Removes all objects inside a single bucket.
+ title: 'EmptyBucket()'
+ notes: |
+ - Policy permissions required:
+ - `buckets` permissions: `select`
+ - `objects` permissions: `select` and `delete`
+ examples:
+ - id: empty-bucket
+ name: Empty bucket
+ isSpotlight: true
+ code: |
+ ```c#
+ var bucket = await supabase.Storage.EmptyBucket("avatars");
+ ```
+ - id: update-bucket
+ description: |
+ Updates a new Storage bucket
+ title: 'UpdateBucket()'
+ notes: |
+ - Policy permissions required:
+ - `buckets` permissions: `update`
+ - `objects` permissions: none
+ examples:
+ - id: update-bucket
+ name: Update bucket
+ isSpotlight: true
+ code: |
+ ```c#
+ var bucket = await supabase.Storage.UpdateBucket("avatars", new BucketUpsertOptions { Public = false });
+ ```
+
+ - id: delete-bucket
+ description: |
+ Deletes an existing bucket. A bucket can't be deleted with existing objects inside it. You must first `empty()` the bucket.
+ title: 'DeleteBucket()'
+ notes: |
+ - Policy permissions required:
+ - `buckets` permissions: `select` and `delete`
+ - `objects` permissions: none
+ examples:
+ - id: delete-bucket
+ name: Delete bucket
+ isSpotlight: true
+ code: |
+ ```dart
+ var result = await supabase.Storage.DeleteBucket("avatars");
+ ```
+
+ - id: from-upload
+ description: |
+ Uploads a file to an existing bucket.
+ title: 'From().Upload()'
+ notes: |
+ - Policy permissions required:
+ - `buckets` permissions: none
+ - `objects` permissions: `insert`
+ examples:
+ - id: upload-file
+ name: Upload file
+ isSpotlight: true
+ code: |
+ ```c#
+ var imagePath = Path.Combine("Assets", "fancy-avatar.png");
+
+ await supabase.Storage
+ .From("avatars")
+ .Upload(imagePath, "fancy-avatar.png", new FileOptions { CacheControl = "3600", Upsert = false });
+ ```
+ - id: upload-file-with-progress
+ name: Upload file with Progress
+ code: |
+ ```c#
+ var imagePath = Path.Combine("Assets", "fancy-avatar.png");
+
+ await supabase.Storage
+ .From("avatars")
+ .Upload(imagePath, "fancy-avatar.png", onProgress: (sender, progress) => Debug.WriteLine($"{progress}%"));
+ ```
+
+ - id: from-update
+ description: |
+ Replaces an existing file at the specified path with a new one.
+ title: 'From().update()'
+ notes: |
+ - Policy permissions required:
+ - `buckets` permissions: none
+ - `objects` permissions: `update` and `select`
+ examples:
+ - id: update-file
+ name: Update file
+ isSpotlight: true
+ code: |
+ ```c#
+ var imagePath = Path.Combine("Assets", "fancy-avatar.png");
+ await supabase.Storage.From("avatars").Update(imagePath, "fancy-avatar.png");
+ ```
+
+ - id: from-move
+ description: |
+ Moves an existing file, optionally renaming it at the same time.
+ title: 'From().Move()'
+ notes: |
+ - Policy permissions required:
+ - `buckets` permissions: none
+ - `objects` permissions: `update` and `select`
+ examples:
+ - id: move-file
+ name: Move file
+ isSpotlight: true
+ code: |
+ ```c#
+ await supabase.Storage.From("avatars")
+ .Move("public/fancy-avatar.png", "private/fancy-avatar.png");
+ ```
+
+ - id: from-create-signed-url
+ description: |
+ Create signed url to download file without requiring permissions. This URL can be valid for a set number of seconds.
+ title: 'From().CreateSignedUrl()'
+ notes: |
+ - Policy permissions required:
+ - `buckets` permissions: none
+ - `objects` permissions: `select`
+ examples:
+ - id: create-signed-url
+ name: Create Signed URL
+ isSpotlight: true
+ code: |
+ ```c#
+ var url = await supabase.Storage.From("avatars").CreateSignedUrl("public/fancy-avatar.png", 60);
+ ```
+
+ - id: from-get-public-url
+ description: |
+ Retrieve URLs for assets in public buckets
+ title: 'from.getPublicUrl()'
+ notes: |
+ - The bucket needs to be set to public, either via [UpdateBucket()](/docs/reference/csharp/storage-updatebucket) or by going to Storage on [supabase.com/dashboard](https://supabase.com/dashboard), clicking the overflow menu on a bucket and choosing "Make public"
+ - Policy permissions required:
+ - `buckets` permissions: none
+ - `objects` permissions: none
+ examples:
+ - id: returns-the-url-for-an-asset-in-a-public-bucket
+ name: Returns the URL for an asset in a public bucket
+ isSpotlight: true
+ code: |
+ ```c#
+ var publicUrl = supabase.Storage.From("avatars").GetPublicUrl("public/fancy-avatar.png");
+ ```
+
+ - id: from-download
+ description: |
+ Downloads a file.
+ title: 'From().Download()'
+ notes: |
+ - Policy permissions required:
+ - `buckets` permissions: none
+ - `objects` permissions: `select`
+ examples:
+ - id: download-file
+ name: Download file
+ isSpotlight: true
+ code: |
+ ```c#
+ var bytes = await supabase.Storage.From("avatars").Download("public/fancy-avatar.png");
+ ```
+ - id: download-file-with-progress
+ name: Download file with Progress
+ code: |
+ ```c#
+ var bytes = await supabase.Storage
+ .From("avatars")
+ .Download("public/fancy-avatar.png", (sender, progress) => Debug.WriteLine($"{progress}%"));
+ ```
+
+ - id: from-remove
+ description: |
+ Deletes files within the same bucket
+ title: 'From().Remove()'
+ notes: |
+ - Policy permissions required:
+ - `buckets` permissions: none
+ - `objects` permissions: `delete` and `select`
+ examples:
+ - id: delete-file
+ name: Delete file
+ isSpotlight: true
+ code: |
+ ```c#
+ await supabase.Storage.From("avatars").Remove(new List { "public/fancy-avatar.png" });
+ ```
+
+ - id: from-list
+ description: |
+ Lists all the files within a bucket.
+ title: 'From().list()'
+ notes: |
+ - Policy permissions required:
+ - `buckets` permissions: none
+ - `objects` permissions: `select`
+ examples:
+ - id: list-files-in-a-bucket
+ name: List files in a bucket
+ isSpotlight: true
+ code: |
+ ```c#
+ var objects = await supabase.Storage.From("avatars").List();
+ ```
+ - id: using-modifiers
+ title: Using Modifiers
+ description: |
+ Filters work on the row level—they allow you to return rows that
+ only match certain conditions without changing the shape of the rows.
+ Modifiers are everything that don't fit that definition—allowing you to
+ change the format of the response (e.g., setting a limit or offset).
+
+ - id: limit
+ title: Limit()
+ description: |
+ Limits the result with the specified count.
+ examples:
+ - id: with-select
+ name: With `Select()`
+ isSpotlight: true
+ code: |
+ ```c#
+ var result = await supabase.From()
+ .Select(x => new object[] { x.Name, x.CountryId })
+ .Limit(10)
+ .Get();
+ ```
+ - id: with-embedded-resources
+ name: With embedded resources
+ code: |
+ ```c#
+ var result = await supabase.From()
+ .Select("name, cities(name)")
+ .Filter("name", Operator.Equals, "United States")
+ .Limit(10, "cities")
+ .Get();
+ ```
+
+ - id: order
+ title: Order()
+ description: |
+ Orders the result with the specified column.
+ examples:
+ - id: with-select
+ name: With `Select()`
+ isSpotlight: true
+ code: |
+ ```c#
+ var result = await supabase.From()
+ .Select(x => new object[] { x.Name, x.CountryId })
+ .Order(x => x.Id, Ordering.Descending)
+ .Get();
+ ```
+ - id: with-embedded-resources
+ name: With embedded resources
+ code: |
+ ```c#
+ var result = await supabase.From()
+ .Select("name, cities(name)")
+ .Filter(x => x.Name == "United States")
+ .Order("cities", "name", Ordering.Descending)
+ .Get();
+ ```
+
+ - id: range
+ title: Range()
+ description: |
+ Limits the result to rows within the specified range, inclusive.
+ examples:
+ - id: with-select
+ name: With `Select()`
+ isSpotlight: true
+ code: |
+ ```c#
+ var result = await supabase.From()
+ .Select("name, country_id")
+ .Range(0, 3)
+ .Get();
+ ```
+
+ - id: offset
+ title: Offset()
+ description: |
+ Specifies the offset of the queried rows to be returned (useful in pagination)
+ examples:
+ - id: with-select
+ name: With `Select()`
+ isSpotlight: true
+ code: |
+ ```c#
+ var result = await supabase.From()
+ .Select(x => new object[] { x.Name, x.CountryId })
+ .Offset(25)
+ .Get();
+ ```
+
+ - id: single
+ title: Single()
+ description: |
+ Retrieves only one row from the result. Result must be one row (e.g. using limit), otherwise this will result in an error.
+ examples:
+ - id: with-select
+ name: With `Select()`
+ isSpotlight: true
+ code: |
+ ```c#
+ var result = await supabase.From()
+ .Select(x => new object[] { x.Name, x.CountryId })
+ .Single();
+ ```
+
+ - id: using-filters
+ title: Using Filters
+ description: |
+ Filters allow you to only return rows that match certain conditions.
+
+ Filters can be used on `Select()`, `Update()`, and `Delete()` queries.
+
+ **Note: LINQ expressions do not currently support parsing embedded resource columns. For these cases, `string` will need to be used.**
+ examples:
+ - id: applying-filters
+ name: Applying Filters
+ code: |
+ ```c#
+ var result = await supabase.From()
+ .Select(x => new object[] { x.Name, x.CountryId })
+ .Where(x => x.Name == "The Shire")
+ .Single();
+ ```
+ - id: filter-by-value-within-json-column
+ name: Filter by values within a JSON column
+ data:
+ sql: |
+ ```sql
+ create table
+ users (
+ id int8 primary key,
+ name text,
+ address jsonb
+ );
+
+ insert into
+ users (id, name, address)
+ values
+ (1, 'Michael', '{ "postcode": 90210 }'),
+ (2, 'Jane', null);
+ ```
+ code: |
+ ```c#
+ var result = await supabase.From()
+ .Filter("address->postcode", Operator.Equals, 90210)
+ .Get();
+ ```
+ - id: filter-foreign-tables
+ name: Filter Foreign Tables
+ code: |
+ ```c#
+ var results = await supabase.From()
+ .Select("name, cities!inner(name)")
+ .Filter("cities.name", Operator.Equals, "Bali")
+ .Get();
+ ```
+
+ - id: or
+ title: Or()
+ description: |
+ Finds all rows satisfying at least one of the filters.
+ examples:
+ - id: with-select
+ name: With `Select()`
+ isSpotlight: true
+ code: |
+ ```c#
+ var result = await supabase.From()
+ .Where(x => x.Id == 20 || x.Id == 30)
+ .Get();
+ ```
+ - id: use-or-with-and
+ name: Use `or` with `and`
+ code: |
+ ```c#
+ var result = await supabase.From()
+ .Where(x => x.Population > 300000 || x.BirthRate < 0.6)
+ .Where(x => x.Name != "Mordor")
+ .Get();
+ ```
+
+ - id: not
+ title: Not()
+ description: |
+ Finds all rows which doesn't satisfy the filter.
+ examples:
+ - id: with-select
+ name: With `Select()`
+ isSpotlight: true
+ code: |
+ ```c#
+ var result = await supabase.From()
+ .Select(x => new object[] { x.Name, x.CountryId })
+ .Where(x => x.Name != "Paris")
+ .Get();
+ ```
+
+ - id: match
+ title: Match()
+ description: |
+ - Finds a model given a class (useful when hydrating models and correlating with database)
+ - Finds all rows whose columns match the specified `Dictionary` object.
+ examples:
+ - id: with-model
+ name: With Model
+ isSpotlight: true
+ code: |
+ ```c#
+ var city = new City
+ {
+ Id = 224,
+ Name = "Atlanta"
+ };
+
+ var model = supabase.From().Match(city).Single();
+ ```
+ - id: with-dictionary
+ name: With Dictionary
+ code: |
+ ```c#
+ var opts = new Dictionary
+ {
+ {"name","Beijing"},
+ {"country_id", "156"}
+ };
+
+ var model = supabase.From().Match(opts).Single();
+ ```
+
+ - id: eq
+ title: Operator.Equals
+ description: |
+ Finds all rows whose value on the stated `column` exactly matches the specified `value`.
+ examples:
+ - id: with-select
+ name: With `Select()`
+ isSpotlight: true
+ code: |
+ ```c#
+ var result = await supabase.From()
+ .Where(x => x.Name == "Bali")
+ .Get();
+ ```
+
+ - id: neq
+ title: Operator.NotEqual
+ description: |
+ Finds all rows whose value on the stated `column` doesn't match the specified `value`.
+ examples:
+ - id: with-select
+ name: With `Select()`
+ isSpotlight: true
+ code: |
+ ```c#
+ var result = await supabase.From()
+ .Select(x => new object[] { x.Name, x.CountryId })
+ .Where(x => x.Name != "Bali")
+ .Get();
+ ```
+
+ - id: gt
+ title: Operator.GreaterThan
+ description: |
+ Finds all rows whose value on the stated `column` is greater than the specified `value`.
+ examples:
+ - id: with-select
+ name: With `Select()`
+ isSpotlight: true
+ code: |
+ ```c#
+ var result = await supabase.From()
+ .Select(x => new object[] { x.Name, x.CountryId })
+ .Where(x => x.CountryId > 250)
+ .Get();
+ ```
+
+ - id: gte
+ title: Operator.GreaterThanOrEqual
+ description: |
+ Finds all rows whose value on the stated `column` is greater than or equal to the specified `value`.
+ examples:
+ - id: with-select
+ name: With `Select()`
+ isSpotlight: true
+ code: |
+ ```c#
+ var result = await supabase.From()
+ .Select(x => new object[] { x.Name, x.CountryId })
+ .Where(x => x.CountryId >= 250)
+ .Get();
+ ```
+
+ - id: lt
+ title: Operator.LessThan
+ description: |
+ Finds all rows whose value on the stated `column` is less than the specified `value`.
+ examples:
+ - id: with-select
+ name: With `Select()`
+ isSpotlight: true
+ code: |
+ ```c#
+ var result = await supabase.From()
+ .Select("name, country_id")
+ .Where(x => x.CountryId < 250)
+ .Get();
+ ```
+
+ - id: lte
+ title: Operator.LessThanOrEqual
+ description: |
+ Finds all rows whose value on the stated `column` is less than or equal to the specified `value`.
+ examples:
+ - id: with-select
+ name: With `Select()`
+ isSpotlight: true
+ code: |
+ ```c#
+ var result = await supabase.From()
+ .Where(x => x.CountryId <= 250)
+ .Get();
+ ```
+
+ - id: like
+ title: Operator.Like
+ description: |
+ Finds all rows whose value in the stated `column` matches the supplied `pattern` (case sensitive).
+ examples:
+ - id: with-select
+ name: With `Select()`
+ isSpotlight: true
+ code: |
+ ```c#
+ var result = await supabase.From()
+ .Filter(x => x.Name, Operator.Like, "%la%")
+ .Get();
+ ```
+
+ - id: ilike
+ title: Operator.ILike
+ description: |
+ Finds all rows whose value in the stated `column` matches the supplied `pattern` (case insensitive).
+ examples:
+ - id: with-select
+ name: With `Select()`
+ isSpotlight: true
+ code: |
+ ```c#
+ await supabase.From()
+ .Filter(x => x.Name, Operator.ILike, "%la%")
+ .Get();
+ ```
+
+ - id: is
+ title: Operator.Is
+ description: |
+ A check for exact equality (null, true, false), finds all rows whose value on the stated `column` exactly match the specified `value`.
+ examples:
+ - id: with-select
+ name: With `Select()`
+ isSpotlight: true
+ code: |
+ ```c#
+ var result = await supabase.From()
+ .Where(x => x.Name == null
+ .Get();
+ ```
+
+ - id: in
+ title: Operator.In
+ description: |
+ Finds all rows whose value on the stated `column` is found on the specified `values`.
+ examples:
+ - id: with-select
+ name: With `Select()`
+ isSpotlight: true
+ code: |
+ ```c#
+ var result = await supabase.From()
+ .Filter(x => x.Name, Operator.In, new List