dotNet

C# and AWS Lambdas, Part 1 - Hello World

First in a series of posts on using .NET with AWS Lambdas. It will start with the simplest example that converts a lowercase string to an uppercase string, but by the end you will be running a .NET Web API powered by lambda, fronted by an API gateway where all the infrastructure is setup by Pulumi - this will take a few posts over the next while.

Indexing the Works of Shakespeare in Elasticsearch – Part 4, Searching via Web API in .NET 5

This is part four of my four part series on indexing the works of Shakespeare in Elasticsearch. In this I'll show how to use the Elasticsearch "low level client" to perform the search. Previously, I wrote a [blog showing how to use a HttpClient](/2020/09/getting-started-with-elasticsearch-part-2-searching-with-a-httpclient/) to perform the search using Json, and this works fine, but Steve Gordon suggested I try to the Elastic client as it supports things like connection pooling and still lets me use Json directly with Elasticsearch.

Working with JSON in .NET, Infrastructure as Code with Pulumi

Full source code available here. This is a follow up to my previous post where I used dynamic and JSON files to make querying ElasticSearch with a HttpClient much easier.

Working with JSON in .NET, a better way?

Full source code available here. Two recent experiences with C# and JSON frustrated me with how difficult it is to work JSON inside an application. I have also been learning Node.

Getting Started with Elasticsearch, Part 3 - Deploying to AWS with Pulumi

Full source code available here. This is part 3 of my short introduction to Elasticsearch. In the first part I showed how to create an Elasticsearch index, mapping, and seeded it with data.

Simmy Chaos Engine for .NET – Part 4, Doing Some Real Damage, Dropping a Table

Full source code here. Want to learn more about Polly? Check out my Pluralsight course on it. Up until now the Simmy examples I’ve written have thrown exceptions, changed successes to failures or slowed down a request.

Registering Multiple Implementations of an Interface with Service Collection in ASP.NET Core

Full source code here. _This is a simplistic approach to the problem and assumes that the dependencies created by the factory do not in turn have their own dependencies. This deficiency could be mediated by passing those dependencies into the factory.

Accessing the HttpContext from the Constructor of a Controller or a Dependency

Full source code here. There are times when you may need to access the HttpRequest from places that it is not normally available such as the constructor of a controller or the constructor of a service that is built by dependency injection.

Simmy Chaos Engine for .NET – Part 3, Adding Latency

Full source code here. Want to learn more about Polly? Check out my Pluralsight course on it. This is the third in my series on chaos engineering with Simmy. The first two posts dealt with the fault policy throwing exceptions and returning failed responses rather than calling the remote service.

Simmy Chaos Engine for .NET – Part 2, Resilience and Injected Faults

Full source code here. Want to learn more about Polly? Check out my Pluralsight course on it. I wrote a blog on using a Simmy Fault policy a few days ago, it is very simple to use by itself, but it is far more useful when used in combination with a resilience policy.