Category: .NET Core

  • Creating a logging provider to write to file

    I wanted to avoid installing libraries like Serilog. Here is a nice article showing an easy way to do this. https://www.roundthecode.com/dotnet/create-your-own-logging-provider-to-log-to-text-files-in-net-core Source code: https://github.com/RoundTheCode/File-Logger and the same for creating a DB logger, by the same author:

  • Using C# Record Types

    I find Zoran Horvat’s videos easy to follow and understand. Here is a new short video he published about C# Record Types. A Record is a regular class with two public read-only properties. Besides construction, no mutation on the object Console.WriteLine nicely prints a record object. Linq distinct works well with the list of records…

  • .NET Core Worker Service with EF Core

    In ASP.NET Core applications, the services can be scoped, that can be resolved or instantiated at the start of a request, and disposed of at the end of a request. But in Worker Service type of applications, the definition of scope is not clear. That’s why we need to implement scoping ourselves. Let’s say every…

  • Linode Object Storage with .NET and C#

    Linode Object Storage is now available on Frankfurt data centre [1]. It is much more affordable and easier to manage unstructured data such as content assets (images, files etc..), sophisticated and data-intensive storage challenges around artificial intelligence and machine learning. Since it is S3-compatible object storage, we can use AWS SDK for .NET for any…

  • ASP.NET Core 3 Service…

    ASP.NET Core 3 Service Registration – AddControllers() AddControllersWithViews() AddRazorPages() With v3 and higher, there are several ways to register MVC. This way the application can only use what it requires, not the whole framework. This would result with a smaller size and being not sure, better performance. AddControllers() If you are developing an API, go…

  • Deserialize json array with System.Text.Json

    Json Data And the class and method for deserialization A post about the performance of system.text.json #json #System.Text.Json #net-core #dotnet

  • BigQuery with .NET Core

    Here is a sample respository ready to be injected to a ASP.NET Core application. #googlecloud #bigquery #aspnetcore

  • JSON Type with MySQL & EF Core

    Since MySQL 5.7.8, you can leverage the built-in json data type to store flexible, semi-structured data in your database. This approach offers several benefits over traditional relational models, especially when dealing with complex or frequently changing data. Let’s explore how to effectively work with JSON data in MySQL using Entity Framework Core (EF Core). Storing…

  • Configuration in .NET Core

    Configuration in .NET Core https://tahirnaushad.com/2017/08/15/asp-net-core-configuration/ and oficial page: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?tabs=basicconfiguration #dotnet #net-core

  • .NET Core and .NET Standard

    A nice article from MSDN Magazine: .NET Standard – Demystifying .NET Core and .NET Standard And a great video series about .NET Standard from the same author: https://www.youtube.com/playlist?list=PLRAdsfhKI4OWx321A_pr-7HhRNk7wOLLY #net-standard #net-core #resources #dotnet

  • MySql with ASP.NET Core

    Create the project: dotnet new console Add mysql package: dotnet add package MySql.Data  Optional: Add an ORM: dotnet add package Dapper Start vscode: code . Connect and and query Run the code: dotnet run #asp-net-core #mysql #mysql-with-net-core

  • .NET Core Command Line CLI Basics

    Yes, developing .NET apps without opening Visual Studio was something I wish for a long time. It was possible but wasn’t that simple. With .NET Core CLI, managing the project is simpler than ever. Let’s see how we can create a new project, build and run and learn some more commands. 1. Creating a Project/Solution…