diff --git a/app/views/docs/authentication-server.phtml b/app/views/docs/authentication-server.phtml index 6e345d2a0..186b5eb5b 100644 --- a/app/views/docs/authentication-server.phtml +++ b/app/views/docs/authentication-server.phtml @@ -204,6 +204,19 @@ client .setJWT("eyJJ9.eyJ...886ca") // Your secret JSON Web Token +
  • +

    .NET

    +
    +
    using Appwrite;
    +
    +var client = new Client();
    +
    +client
    +    .SetEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
    +    .SetProject("[PROJECT_ID]")                // Your project ID
    +    .SetJWT("eyJJ9.eyJ...886ca");               // Your secret JSON Web Token
    +
    +
  • When Should I Use JWT Auth?

    @@ -409,6 +422,29 @@ let documentList = try await databases.listDocuments( / ... More code to manipulate the results +
  • +

    .NET

    +
    +
    using Appwrite;
    +using Appwrite.Services;
    +using Appwrite.Models;
    +
    +var client = new Client();
    +
    +client
    +    .SetEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
    +    .SetProject("[PROJECT_ID]")                // Your project ID
    +    .SetJWT("eyJJ9.eyJ...886ca");               // Your secret JSON Web Token
    +
    +var databases = new Databases(client);
    +
    +var documentList = await databases.ListDocuments(
    +    databaseId: "642f358bf4084c662590",
    +    collectionId: "642f3592aa5fc856ad1e");
    +
    +// ... More code to manipulate the results
    +
    +
  • Only the birthday of Kevin is returned and documents where user-A has no permissions to access are not returned.

    @@ -587,7 +623,30 @@ client databaseId: "642f358bf4084c662590", collectionId: "642f3592aa5fc856ad1e" ) - / ... More code to manipulate the results + // ... More code to manipulate the results + + +
  • +

    .NET

    +
    +
    using Appwrite;
    +using Appwrite.Services;
    +using Appwrite.Models;
    +
    +var client = new Client();
    +
    +client
    +    .SetEndpoint("https://cloud.appwrite.io/v1")   // Your API Endpoint
    +    .SetProject("[PROJECT_ID]")                  // Your project ID
    +    .SetKey("919c2d18fb5d4...a2ae413da83346ad2");  // Your secret API key
    +
    +var databases = new Databases(client);
    +
    +var documentList = await databases.ListDocuments(
    +    databaseId: "642f358bf4084c662590",
    +    collectionId: "642f3592aa5fc856ad1e");
    +
    +// ... More code to manipulate the results
  • diff --git a/app/views/docs/databases-relationships.phtml b/app/views/docs/databases-relationships.phtml index d1fec05c4..5b0feb4c0 100644 --- a/app/views/docs/databases-relationships.phtml +++ b/app/views/docs/databases-relationships.phtml @@ -299,6 +299,29 @@ databases.createRelationshipAttribute( ) +
  • +

    .NET

    +
    +
    using Appwrite;
    +using Appwrite.Services;
    +
    +var client = new Client()
    +    .SetEndpoint("https://cloud.appwrite.io/v1")
    +    .SetProject("[PROJECT_ID]");
    +
    +var databases = new Databases(client);
    +
    +await databases.CreateRelationshipAttribute(
    +    databaseId: "marvel",
    +    collectionId: "movies",
    +    relatedCollectionId: "reviews",
    +    type: "oneToMany",
    +    twoWay: true,
    +    key: "reviews",
    +    twoWayKey: "movie",
    +    onDelete: "cascade");
    +
    +
  • The above example adds a relationship between the collections movies and reviews. A relationship attribute with the key reviews is added to the movies collection and another relationship attribute with the key movie is added to the reviews collection.

    diff --git a/app/views/docs/getting-started-for-server.phtml b/app/views/docs/getting-started-for-server.phtml index a5e1b2c3b..e5ede12fe 100644 --- a/app/views/docs/getting-started-for-server.phtml +++ b/app/views/docs/getting-started-for-server.phtml @@ -99,6 +99,12 @@ $swiftVersion = $versions['swift'] ?? ''; ] +
  • +

    .NET

    +
    +
    dotnet add package Appwrite
    +
    +
  • Create Your First Appwrite Project

    @@ -216,6 +222,17 @@ let client = Client() +
  • +

    .NET

    +
    +
    using Appwrite;
    +
    +var client = new Client()
    +  .SetEndpoint("http://cloud.appwrite.io/v1")  // Your Appwrite Endpoint
    +  .SetProject("[PROJECT_ID]")               // Your project ID
    +  .SetKey("919c2db5d4...a2a3346ad2");                        // Your secret API Key
    +
    +
  • @@ -373,6 +390,18 @@ let client = Client() .setEndpoint("https://cloud.appwrite.io/v1") // Your Appwrite Endpoint .setProject("[PROJECT_ID]") // Your project ID .setJWT("919c2db5d4...a2a3346ad2") // Your secret JWT + +
    + +
  • +

    .NET

    +
    +
    using Appwrite;
    +
    +var client = new Client()
    +  .SetEndpoint("http://cloud.appwrite.io/v1")  // Your Appwrite Endpoint
    +  .SetProject("[PROJECT_ID]")               // Your project ID
    +  .SetJWT("919c2db5d4...a2a3346ad2");                        // Your secret JWT
     
  • @@ -521,6 +550,21 @@ let user = try await users.create( ) +
  • +

    .NET

    +
    +
    using Appwrite.Services;
    +using Appwrite.Models;
    +
    +var users = new Users(client);
    +
    +var user = await users.Create(
    +    userId: ID.Unique(),
    +    email: "email@example.com",
    +    phone: null,
    +    password: "password");
    +
    +
  • Full Example

    @@ -711,6 +755,27 @@ let user = try await users.create( ) +
  • +

    .NET

    +
    +
    using Appwrite;
    +using Appwrite.Services;
    +using Appwrite.Models;
    +
    +var client = new Client()
    +  .SetEndpoint("http://cloud.appwrite.io/v1")    // Your Appwrite Endpoint
    +  .SetProject("[PROJECT_ID]")                 // Your project ID
    +  .SetKey("cd868db89");                         // Your secret API key
    +
    +var users = new Users(client);
    +
    +var user = await users.Create(
    +    userId: ID.Unique(),
    +    email: "email@example.com",
    +    phone: null,
    +    password: "password");
    +
    +
  • Next Steps

    diff --git a/app/views/docs/storage.phtml b/app/views/docs/storage.phtml index c54e98b3b..da51c3493 100644 --- a/app/views/docs/storage.phtml +++ b/app/views/docs/storage.phtml @@ -516,6 +516,33 @@ File content. +
  • +

    .NET

    +

    + The Appwrite .NET SDK expects an InputFile class for file inputs. +

    + + + + + + + + + + + + + + + + + + + + + +
    MethodDescription
    InputFile.FromPath(string path)Used to upload files from a provided path.
    InputFile.FromStream(Stream stream, string filename, string mimeType)Used to upload files from a Stream object. Specify the file MIME type using the mimeType param.
    InputFile.FromBytes(byte[] bytes, string filename, string mimeType)Used to upload files from an array of bytes. Specify the file MIME type using the mimeType param.