bitScry

  • Home
  • Blog
  • Contact
  • GitHub

Dependency Injection

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
  • Azure Table Storage Dependency Injection 9th March 2021
  • Inspecting Data in SQL Tables 4th December 2020
  • RestSharp Response Character Encoding 24th September 2020
  • RestSharp AWS S3 Authentication 18th September 2020
  • Grouping Azure Table Storage Entities 17th September 2020
Tag Cloud
.NET .NET Core API appsettings.json ASP.NET Core Authentication Authorization Azure Azure Active Directory Azure AD Azure Function Azure Storage Blob Bootstrap C# Console Application CSS CSV DataTable Dependency Injection Dictionary Enum Extension GZip HTML Image JavaScript jQuery JSON List Middleware MVC MVC 6 Random Serilog SFTP SQL Stored Procedure Stream String Table Table Storage Tag Helper Web Application WordPress
Reading List
  • Build a Wi-Fi Scanner
  • IoT Weather Station
  • User accounts made easy with Azure
  • Install macOS High Sierra in VirtualBox
Uncategorised

Azure Table Storage Dependency Injection

Extension methods for adding a BlobServiceClient are provided by Microsoft as previously mentioned, however there’s no equivlent for adding access for Table (or Cosmos DB) storage. The below extension allows CloudTable and CloudTableClients to be injected. Though as Table storage doesn’t yet work with Managed Service Identity the relevant SAS Read more…

By Shinigami, 1 month1 month ago
Programming

Best Practices for Using Azure SDK with ASP.NET Core

Mostly just a link to this article containing best practices. There’s some useful extension methods available from Microsoft.Extensions.Azure to make for easier dependency injection of the various Azure services. There’s also some good examples available here.

By Shinigami, 7 months7 months ago
Programming

Dependency Injection in Azure Functions v3

In the v3 version of Azure Functions DI is better supported and there’s now some offical documentation demonstrating how it’s done. It’s pretty similar to how it was done previously, below is updated code from my previous v2 example. Startup.cs The IFunctionsHostBuilder instance is created by the Azure functions host Read more…

By Shinigami, 1 year10 months ago
Programming

Dependency Injection in Azure Functions v2

Dependency Injection (DI) has been available in .NET Core Web Applications for a while and now seems to have finally made it’s way to Azure Functions as well and is available in the current Azure Functions Runtime 2.0.12382. The GitHub issue tracking DI implementation in Azure Functions is here. I’ve Read more…

By Shinigami, 2 years1 year ago
Programming

Logging in .NET Core Console Applications

Adding logging to a .NET Core console application In .NET Core projects logging is managed via dependency injection. Whilst this works fine for ASP.NET projects where this is all automatically created upon starting a new project in Startup.cs, in console applications it takes a bit of configuration to get it up and Read more…

By Shinigami, 4 years1 year ago
Programming

ASP.NET Core Settings Dependency Injection

ASP.NET Core Settings Dependency Injection There’s a variety of different ways to access configuration settings from an appsettings.json file in a project, these are all well documented here so this post is mostly intended to serve as a reminder for the methods I most frequently use. Dependency injection (DI) is Read more…

By Shinigami, 4 years3 years ago
Hestia | Developed by ThemeIsle