Implementing FileHelper for compatibility with all operating systems in Asp.Net Core
When working with files in C#, we usually consider them to work correctly on all operating systems, as file paths differ between Windows, Linux, and macOS. For example, in Windows, we use "\" to separate directories, while in Linux, "/" is used. If we have specified paths in our code ....
Read more
Building projects before git push
When we work for several hours and get tired, it is possible to push the project quickly and not check whether the project will be built or not. In Git, it is possible to run a series of commands before pushing. Therefore, we can use ....
Read more
Writing test with a real database and xUnit
When writing tests, in some cases we need to connect with the database to read data from it or store records in it. If we use a fixed database, the values in the database will change every time the tests are run, and if someone else works with the database and changes ....
Read more
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
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