# {{ spec.title }} {{sdk.name}} SDK

![License](https://img.shields.io/github/license/{{ sdk.gitUserName|url_encode }}/{{ sdk.gitRepoName|url_encode }}.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-{{ spec.version|url_encode }}-blue.svg?style=flat-square)
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
{% if sdk.twitterHandle %}
[![Twitter Account](https://img.shields.io/twitter/follow/{{ sdk.twitterHandle }}?color=00acee&label=twitter&style=flat-square)](https://twitter.com/{{ sdk.twitterHandle }})
{% endif %}
{% if sdk.discordChannel %}
[![Discord](https://img.shields.io/discord/{{ sdk.discordChannel }}?label=discord&style=flat-square)]({{ sdk.discordUrl }})
{% endif %}
{% if sdk.warning %}

{{ sdk.warning|raw }}
{% endif %}

{{ sdk.description }}

{% if sdk.logo %}
![{{ spec.title }}]({{ sdk.logo }})
{% endif %}

## Installation

### .NET
Add this reference to your project's `.csproj` file:

```xml
<PackageReference Include="{{ spec.title | caseUcfirst }}" Version="{{ sdk.version }}" />
```

You can install packages from the command line:

```powershell
# Package Manager
Install-Package {{ spec.title | caseUcfirst }} -Version {{ sdk.version }}

# or .NET CLI
dotnet add package {{ spec.title | caseUcfirst }} --version {{ sdk.version }}
```


{% if sdk.gettingStarted %}

{{ sdk.gettingStarted|raw }}
{% endif %}

### Preparing Models for Databases API

For the .NET SDK, we use the `Newtonsoft.Json` library for serialization/deserialization support. The default behavior converts property names from `PascalCase` to `camelCase` on serializing to JSON. In case the names of attributes in your Appwrite collection are not created in `camelCase`, this serializer behavior can cause errors due to mismatches in the names in the serialized JSON and the actual attribute names in your collection.

The way to fix this is to add the `JsonProperty` attribute to the properties in the POCO class you create for your model.

For e.g., if you have two attributes, `name` (`string` type) and `release_date` (`DateTime` type), your POCO class would be created as follows:

```csharp
public class TestModel
{
  [JsonProperty("name")]
  public string Name { get; set; }

  [JsonProperty("release_date")]
  public DateTime ReleaseDate { get; set; }
}
```

The `JsonProperty` attribute will ensure that your data object for the Appwrite database is serialized with the correct names.

## Contribution

This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request.

## License

Please see the [{{spec.licenseName}} license]({{spec.licenseURL}}) file for more information.
