Use ThrowHelper instead of throw new Exception


When we want to raise an error in the program, we usually use throw new exception and put the appropriate text of the error in the exception class. But if the number of these export errors increases, it will increase the assembly code. ....
Read more

MongoDB expiration time index in Asp.Net Core


Sometimes you need to keep data for a certain period of time and then delete it. If you want to do it yourself, you are doing something time-consuming and unreasonable. But you can do this using the Expiration time for the MongoDB database or the TTL for Radis ....
Read more

How does ConfigureAwait(false) work?


If you have worked with Asp.Net MVC, you are probably familiar with this word. When a request is sent to Asp.Net MVC applications, request information such as Uri, Headers, RemoteAddress, etc. is contained in HttpContext.Current. ....
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