Exception handling in Asp.Net Core 3.1
In this section we want to create a general middleware for error management in the program. This means that when an error occurs anywhere in the program, we can find the error with this middleware and show the appropriate message to the user. The way this middleware w ....
Read more
Introducing Dapper
What is a Dapper? Dapper is a small and very fast ORM developed by Stackoverflow. Dapper works with any type of database and is not specific to a specific database. Using Dapper, you can execute SQL statements as Stored Procedure or as direct SQL statements. If you have to write ....
Read more
How to use Remote Attribute in Asp.Net Core
Sometimes it is necessary to check the value of one of the fields when entering information in a form. For example, when registering a user on the site, we want to check the user name or phone number that is not available in the database, and if there is a record in the datab ....
Read more
Use IClientModelValidator in Asp.Net Core 3.1
If we want to create an attribute for validation, we usually create a class and inherit from the ValidationAttribute. And then we override the IsValid method according to the need we have for that attribute. For example, in the following we have created an attribute that compares two properties ....
Read more
Clear SQL logs
In SQL Server, whenever something is done, its log is stored in a file called ERRORLOG.n . The letter n at the end of the ERRORLOG filename is a number that whenever SQL is restarted or executed, a new file with a new number is created. For example , ERRORLOG.1 ....
Read more