I have come across a situation where functions are very helpful. I can create it using its syntax and then I would use them in select or procedures.
But recently I have found that a function is called automatically when a row is inserted or updated. Also it is accepting two parameters. This user-defined scalar function is neither called in C# through ORM and moreover there is no stored procedure using this function, yet it is being called and as per my assumption, this setting must be in a table itself. It is triggered automatically when a row is updated or inserted.
Can somebody please throw some light on this as I have never encountered it before. An example of it would really be helpful that how it is created and how we can call this function.