I have a trigger in SQL Server, but I need to pass arguments to the CLR code, i.e., information not provided in the trigger context.
Is something like this even possible?
CREATE TRIGGER MyTrigger ON MyTable FOR INSERT
AS EXTERNAL NAME MyAssembly.MyNamespace.MyTriggerHandler("Foo", "Bar")
These arguments would be static, of course.
The number of argument permutations is discrete, but creating a separate class or function in the CLR assembly for each would be unwieldy, and would require a compile / deploy step I want to avoid every time another trigger is needed.