Hello Pavel,
You can use InitFcn, PreLoadFcn or PostLoadFcn Callbacks to run your MATLAB Code to load the assembly or you can create a C++ S-Function to wrap the C# DLL.
To read more about Callbacks: - https://www.mathworks.com/help/simulink/callback-functions.html
Thanks,
Animesh Jha