Tagged articles
Image from Pexels

Tagged articles - .NET Core

Found 63 articles tagged with .NET Core

C# scripting with .NET Core global tool
Using .NET Core global tool to run C# script files
0
I assume since you are reading this article you are involved in development of applications using C# and .NET platform. Microsoft .NET and C# have been around for quite a while but there is not much talk on haw you can use C# for writing code apart from creating your projects in your IDE of choice and compiling them to executables. This is typical approach for writing robust applications and that is fine, but from time to time, this whole ceremony of creating a project, adding packages and libraries just to run for example a simple scheduled task that cleans up old logs from IIS seems like and overkill...read more
Using interceptors with dependency injection in Entity Framework Core
EF Core interceptors via dependency injection in ASP.NET 5
0
I while ago I wrote an article on how to Access multiple databases from the same DbContext in EF Core which relies on interceptors to mutate the SQL query diring execution. This code works just fine and it updates the command prior to it's execution, but it lacks in option to inject registered services to it's constructor as i used new keyword to initialize class instances. Adding interceptor without dependency injection ...read more
Setting Azure DevOps pipeline variable from PowerShell script
Output value from PowerShell script to Azure DevOps builds and releases
0
When using Azure DevOps Pipelines or Releases, it is pretty easy to move informations from the pipeline/release into the target artifact package or folder on the target environment. What can be tricky if you need to dictate your pipeline/release based on the value from your code base or maybe the environment to which you are deploying to. As a simple example I set the version attribute in in my .csproj file which I will use to tell UseDotNet task in my build pipeline which SDK to use to perform .NET Core project build. ...read more
Accessing multiple databases from the same DbContext in EF Core
Multiple database access from the same DbContext in Entity Framework Core 5
 
0
It is not uncommon to have a requirement to access tables or views in different databases in the same query. In order to be able to do your joins on tables or views in different databases you need to do it in the same connection instance which is bound to DbContext, therefore this access as to be accomplished from the same DbContext instance...read more
Building and using advanced .NET Core CLI global tools
Handling commands, arguments and options in .NET CLI global tool application
0
Once .NET Core 2.1 SDK introduced support for global tools I wrote a brief article on how to create a simple global CLI tool in .NET Core Building advanced .NET Core Global Tool using CommandLineUtils package. While this is fair enough informations to kick-start you project and create a simple global tool to use from the command line, I found out there is more to it in order to have the tool built, published, distributed and used especially when you are dealing with real-life applications that need to have a CLI as a part of the solution. ...read more
Dealing with default API versions in Swagger UI
Fixing additional routes in Swagger API when using default versions
0
Having your REST API versioned is important for evolving of the service over time. Especially if your service is exposed t multiple 3rd party clients...read more
Setting up code coverage reports in Azure DevOps pipeline
Code coverage in .NET Core projects with Azure DevOps
0
I while ago I wrote and article about Publishing .NET Core code analysis to SonarCloud from Azure build pipeline. Although SonarCloud is a great platform for analyzing your code coverage and dry code analysis, it can add additional cost to your project...read more
Using Polly for retrial policies with Autofac
Confguring and using Polly with with pretty much anything
0
Some time ago I wrote an article which explains how to Increase service resilience using Polly and retry pattern in ASP.NET Core. This is a great way how to easily implement retrials when using .NET Core dependency injection, but in case of using Autofac with .NET Framework 4.x you do not have many out of the box solutions. However, Polly as a library is not specifically built for .NET Core and using it with other dependecy injection packages such as Autofac is fairly easy...read more
Validate configurations with FluentValidation in ASP.NET Core
Validating IOptions models with FluentValidaton
0
Configuration is an important part of the application. In many cases it determines how the application will behave, for example when you have different configurations per environment...read more
Combining multiple Swagger API endpoints in a single UI
Multiple REST API microservices endpoints in a single Swagger UI
 
0
Shifting from traditional monolithic application architecture to micorservices can solve bunch of problems and issues monolith application application design approach introduces, but on the other hand it has it's own drawbacks, although number of drawbacks compared to number of problems it solves is a lot greater so it makes sense to take a path in process of moving from monolithic to micorservices. On of the steps to move to micorservices is to physically have your services running as individual processes...read more
Overwriting configuration values with environment variable in ASP.NET Core
Using environment specific variables to overwrite configuration values in ASP.NET Core
 
0
It is obvious that no matter what is the size and complexity of your application, configuration values on your local development machine and the environment where the application is going to run will be different. To avoid any hard-coding and recompilation of your code, the most common practice is to store application and environment specific values to configuration files...read more
Custom SignalR hub authorization in ASP.NET Core
ASP.NET Core SignalR hub authorization
 
0
SignalR is number one choice for real-time communication between server and client. It implements several transports for communication between server and client...read more
Using options pattern in MVC5 legacy applications with web.config
Simple implementation of options pattern in .NET Framework 4.x legacy applications
 
0
The story behind New descendant of .NET Framework, .NET Core, comes with one really useful pattern for reading and using configuration files. It comes with out of the box support for JSON configuration files which are much more readable and give much greater freedom and flexibility on how to organize your settings...read more
Ignoring properties from controller action model in Swagger using JsonIgnore
Excluding properties from Swagger in controller action input model using Newtonsoft.Json package
0
While designing the REST API, quite often you may find yourself in a situation where the data can be provided from multiple sources, like route, query string or POST/PUT payload. While that might not be a big problem, it may force you to redesign your models and most likely you will end up with keeping your original DTOs but then designing a new model in your application services layer just to have all your data from different sources in one place when you are passing it to the service method. Resolving multiple sources custom binding ...read more
Strongly typed configuration sections with options pattern in ASP.NET Core
Loading configuration values directly to classes and use them in the runtime
0
Configuration is probably the most essential part of every application, yet we do not give much attention to it during application design and development. .NET Core has quite nice way to store configurations (usually JSON files) and already built-in extensions to access configuration values and directly cast them to a specific type...read more

.NET

read more

JavaScript

read more

SQL/T-SQL

read more

Umbraco CMS

read more