bitScry

  • Home
  • About
  • Blog
  • Contact

.NET Core

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
  • Killing a Process Locking Port on a Mac
  • Mocking Hangfire BackgroundClient Jobs
  • Running Shinobi CCTV on a Raspberry Pi
  • Visual Studio CoreCLR Error
  • Adding Healthchecks to a .NET Core 6 API
Tag Cloud

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

Programming

Visual Studio CoreCLR Error

I got the below error when trying to start a newly scaffolded web app. The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use .NET Core. This may be expected if the target process did not run on .NET Core. This Read more…

By Shinigami, 3 months ago
Programming

IAsyncEnumerable Disambiguation

I’ve been using IAsyncEnumerable recently for the streaming of SQL query rows and of deserialized objects from API calls and while it seems to work like a charm it does seem to have a few configuration issues. Firstly, on creating a new .NET Core project in Visual Studio 2019 (v16.3.5) Read more…

By Shinigami, 3 years6 January 2020 ago
Programming

Creating a Client for Accessing an API in .NET Core

While there seems to be plenty of resources and guides out there to help users create an API there seems to be much less guidance on how to create a client for accessing an API. I’m fine with calling an API using HttpClient or through a library such as RestSharp Read more…

By Shinigami, 3 years14 November 2019 ago
Programming

Passing NULL Values to a SQL Stored Procedure from .NET Core

I’ve previously posted about how to cope with nullable values retrieved from a SqlDataReader but it’s also necessary to account for nulls when passing values through to a SQL operation such as a stored procedure. sp__set_completed.sql If you want you’re stored procedure to accept nulls then you first need to Read more…

By Shinigami, 3 years7 October 2019 ago
Programming

Complex objects in Session and TempData Variables

Session and TempData variables can be used in MVC controllers to pass variables between actions or from actions to views, however if you want to pass complex objects through using these variables the base classes need to be extended to serialize/deserialize the provided objects to/from JSON. Once the above classes Read more…

By Shinigami, 4 years31 August 2018 ago
Programming

Getting a List of Countries and Their Identifiers

The RegionInfo class in System.Globilization provides useful details about a region (country) such as the name, currency and ISO identifying codes. If you want to get a RegionInfo for every available country then you can use the following code which came from this post.

By Shinigami, 4 years18 July 2018 ago
Programming

Building URIs in .NET Core

Creating URIs with parameters in .NET Core is more complicated than I’d initially expected. As a result I ended up creating my own methods based upon this Stack Overflow answer. To begin with I needed a version to return relative paths I’ve also created a version to return a fully Read more…

By Shinigami, 5 years25 September 2017 ago
Programming

SQL Stored Procedure in .NET Core

I call SQL stored procedures slightly differently in .NET Core to the way I did in .NET framework as I now pass the connection string through as an argument and I need to remember to add the System.Data.SqlClient NuGet package.

By Shinigami, 5 years14 September 2017 ago
Programming

Comparing List Objects

I have a list of EventType objects with the following definition. These are used in a web application where the properties can be adjusted and the resulting list is posted back to the controller action. Rather than updating all the objects returned (even the non-modified ones) I wanted to extract Read more…

By Shinigami, 5 years4 August 2017 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, 5 years31 May 2017 ago

Posts navigation

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