Skip to content

Commit 413afaa

Browse files
Update README.md
1 parent 48d9306 commit 413afaa

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

README.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ application development.
2626
2. [Why LocalStack.NET Client?](#why-localstacknet-client)
2727
3. [Prerequisites](#prerequisites)
2828
4. [Getting Started](#getting-started)
29+
- [Setup](#setup)
2930
- [Configuration](#configuration)
30-
- [Integrating with Dependency Injection](#integrating-with-dependency-injection)
3131
5. [Known Issues](#known-issues)
3232
6. [Developing](#developing)
3333
- [Building the Project](#building-the-project)
@@ -74,6 +74,29 @@ Refer to [documentation](https://github.com/localstack-dotnet/localstack-dotnet-
7474

7575
`LocalStack.NET` is a library that provides a wrapper around the [aws-sdk-net](https://github.com/aws/aws-sdk-net). This means you can use it in a similar way to the `AWS SDK for .NET` and to [AWSSDK.Extensions.NETCore.Setup](https://docs.aws.amazon.com/sdk-for-net/latest/developer-guide/net-dg-config-netcore.html) with a few differences. For more on how to use the AWS SDK for .NET, see [Getting Started with the AWS SDK for .NET](https://docs.aws.amazon.com/sdk-for-net/v3/developer-guide/net-dg-setup.html).
7676

77+
### Setup
78+
79+
Here's a basic example of how to setup `LocalStack.NET`:
80+
81+
```csharp
82+
public void ConfigureServices(IServiceCollection services)
83+
{
84+
// Add framework services.
85+
services.AddMvc();
86+
87+
services.AddLocalStack(Configuration)
88+
services.AddDefaultAWSOptions(Configuration.GetAWSOptions());
89+
services.AddAwsService<IAmazonS3>();
90+
services.AddAwsService<IAmazonDynamoDB>();
91+
}
92+
```
93+
94+
The `AddLocalStack` method integrates LocalStack.NET into your application, and the `AddAwsService` method allows you to specify which AWS services you want to use with LocalStack.
95+
96+
<e><b>(Alternatively, `AddAWSServiceLocalStack` method can be used to prevent mix-up with `AddAWSService`.)</b><e>
97+
98+
`AddLocalStack` extension method is responsible for both configurations and adding of `LocalStack.Client` dependencies to service collection.
99+
77100
### Configuration
78101

79102
To configure LocalStack.NET, you can use entries in the appsettings.json files. Here's a basic example for different environments:
@@ -105,30 +128,7 @@ To configure LocalStack.NET, you can use entries in the appsettings.json files.
105128
}
106129
```
107130

108-
The `RegionName` is important as LocalStack creates resources based on the specified region. For more advanced configurations and understanding how LocalStack.NET operates with LocalStack, refer to documentation.
109-
110-
### Integrating with Dependency Injection
111-
112-
Here's a basic example of how to integrate `LocalStack.NET` with the .NET dependency injection:
113-
114-
```csharp
115-
public void ConfigureServices(IServiceCollection services)
116-
{
117-
// Add framework services.
118-
services.AddMvc();
119-
120-
services.AddLocalStack(Configuration)
121-
services.AddDefaultAWSOptions(Configuration.GetAWSOptions());
122-
services.AddAwsService<IAmazonS3>();
123-
services.AddAwsService<IAmazonDynamoDB>();
124-
}
125-
```
126-
127-
The `AddLocalStack` method integrates LocalStack.NET into your application, and the `AddAwsService` method allows you to specify which AWS services you want to use with LocalStack.
128-
129-
<e><b>(Alternatively, `AddAWSServiceLocalStack` method can be used to prevent mix-up with `AddAWSService`.)</b><e>
130-
131-
`AddLocalStack` extension method is responsible for both configurations and adding of `LocalStack.Client` dependencies to service collection.
131+
The `RegionName` is important as LocalStack creates resources based on the specified region. For more advanced configurations and understanding how LocalStack.NET operates with LocalStack, refer to [documentation](https://github.com/localstack-dotnet/localstack-dotnet-client/wiki/Setup#configuration).
132132

133133
## Known Issues
134134

0 commit comments

Comments
 (0)