Is it possible to call a function on every insert or update to MSSQL database? Specifically, I have to remove all extra spaces (regex: " {2,}") from every string inserted into the database. The project is already too big, it's impossible to change this behavior everywhere.
If it's not achievable using the database configuration, can it be done with Entity Framework?