bitScry

  • Home
  • About
  • Blog
  • Contact

Eating all the data

About this site

This is a blog to help me remember some of the coding challenges I’ve faced and hopefully help others out if they’re suffering the same problems.

Recent Posts
  • Cloning a Private Repository in a GitHub Workflow
  • Installing Multiple .NET Versions in GitHub Actions
  • Serving Images from Blob Storage in an Azure Function
  • Redis Caching in .NET
  • Passing Environment Variables From Docker to .NET Web App
Tag Cloud

.NET .NET Core AAD API ASP.NET Core Authentication Azure Azure Active Directory Azure Function Azure Storage Blob Bootstrap C# Console Application CSS DataTable Dependency Injection Dictionary Entity Framework Enum Extension Google GZip HTML Image JavaScript jQuery JSON List Middleware MVC Newtonsoft RestSharp Serilog SQL SSDT SSIS Stored Procedure Stream Table Table Storage Test Web App Web Application WordPress

Programming

Cloning a Private Repository in a GitHub Workflow

When working with GitHub workflows it’s possible to checkout different repositories to the one that the workflows are present in. However if the source repository is private you’ll get a not found error when trying to clone it even if … Read more

By Shinigami, 4 months ago
Programming

Installing Multiple .NET Versions in GitHub Actions

I’m currently creating GitHub Action pipelines for building and testing multiple solutions within a single large monorepo. These solutions target a variety of .NET versions so in order to allow them all to run in my pipeline I need to … Read more

By Shinigami, 4 months ago
Azure

Serving Images from Blob Storage in an Azure Function

I’ve previously written about how to return an image from an Azure Function which deals with returning a generated image from the function, however it’s also useful to return images which might be stored elsewhere such as in Azure Blob … Read more

By Shinigami, 9 months16 January 2023 ago
Programming

Redis Caching in .NET

We’ve recently implemented Redis caching in an API which took a little bit of time to figure out. Redis caching is available through the Microsoft.Extensions.Caching.Distributed package and this also supports other provides such as NCache. In our case we only … Read more

By Shinigami, 10 months7 December 2022 ago
Programming

Passing Environment Variables From Docker to .NET Web App

We have a build pipeline running in GitHub Actions that builds a .NET 6 web in a Docker container and then publishes it to AWS. Within this pipeline we have a manual step where we can chose the source branch … Read more

By Shinigami, 11 months16 November 2022 ago
Programming

Retrieving Data from MySQL Stored Procedures in .NET

We’re currently working on a .NET backend API project that retrieves data from a MySQL database and returns it to a frontend React app. As this is a migration project we’re working with a pre-existing MySQL database which given it’s … Read more

By Shinigami, 11 months ago
Programming

Excluding Child Properties from a List of Objects in Fluent Assertions

We’re currently using Fluent Assertions to help make writing tests for our project a bit easier. This is a very handy library and certainly helps to make test conditions easier to specify and more readable. One issue we did have … Read more

By Shinigami, 11 months ago
Programming

Creating a Code Coverage Report for Multiple Projects

The current solution I’m working on is composed of 11 seperate projects, 3 of which are test projects. As part of our CI/CD deployment pipeline we want to be able to generate a code coverage report for these projects which … Read more

By Shinigami, 1 year7 September 2022 ago
Programming

Mocking IHttpContextAcessor

If you use IHttpContextAccessor in any services then you may need to mock it for unit tests. It’s quite a complicated class but in order to mock the request URL the below code can be used.

By Shinigami, 1 year ago
Programming

DateOnly in Swagger and API Controllers

The new datatypes of DateOnly and TimeOnly are a good addition to C# but it feels as if they were released too soon without proper integration with other features. An example of this is their integration with API controllers, when … Read more

By Shinigami, 1 year24 August 2022 ago

Posts navigation

1 2 … 20 Next
  • Facebook
  • Twitter
  • Instagram
  • Email
Hestia | Developed by ThemeIsle