Integration test in Asp.Net Core with xUnit


In the previous article, we examined an example of writing a unit test. In this article, we want to implement testing for APIs using the xUnit library. For this, we first create an Asp.Net Core Web App project. Then we create a controller called UsersController ....
Read more

Customize Redis commands with LuaScript in Asp.Net Core


If we want to call Redis commands directly into the program, we can use LuaScript, which is located in the StackExchange.Redis library. Using LuaScript, we can execute several Redis commands in one request. Consider a scenario in which the number of times an API or me ....
Read more

Create custom HttpMethod in Asp.Net Core


In Asp.Net Core there are 7 HttpMethod attributes by default: (HttpDelete, HttpGet, HttpPost, HttpPut, HttpOption, HttpPatch, HttpHead). In this article, we want to create two custom attributes called HttpRead and HttpWrite that use HttpWrite ....
Read more

Unit Testing in Asp.Net Core with xUnit


Today, testing is one of the most important aspects of the development and production of software. Although writing a test reduces the speed of development, its benefits are evident during development, the addition of new features, and changes. ....
Read more

Synchronize MemoryCache in all instances


In projects where several instances are on the server and use MemoryCache , one of the problems is managing their Memory Cache. For example, on one instance there is data inside the Memory that is different from other instances ....
Read more

Implement Circuit Breaker in Asp.Net Core


Consider the scenario in which you send a request API to your application using HttpClient. If an external service becomes unavailable, requests sent to your application that you send to this API via HttpClient will be delayed ....
Read more

GitLab CI-CD .Net Core


This article covers the implementation of a simple example of CICD for a .Net Core project on GitLab with windows runner. In practice, we want to implement a service that automatically does what we do manually to publish the project. What do we do to publish a .NET ....
Read more

Implementing RabbitMQ in .Net Core


RabbitMq acts like a FIFO queue; That is, the data enters the queue in sequence and is sent to the consumers in order. To get started, create a new solution called RabbitMqExample and add the following projects. ....
Read more

Difference between IOptions, IOptionsSnapshot and IOptionsMonitor


In the previous article , we discussed how to read data from appsettings.json by IOptions . In this article, we will examine the differences between IOptions, IOptionsMonitor and IOptionsSnapshot. ....
Read more

Read data from appsettings.json in asp.net core


In asp.net core, parameters such as database connection strings , service-related configurations, data that is rarely changed are placed in the appsettings.json file and must be load from appsettings.json whenever needed from ....
Read more