Custom controller based on base controller class

Hello Radzen team,
Is it possible to create a custom controller based on a base controller?
With reference to the attached files I created a copy of your default ServerMethodsController.cs ,ServerMethodsController.cs based on a base controller BaseServerMethodsController.cs
However Invoke custom method does not show ServerMethodsController2 although it does display the base class.
2021-01-21_23-31-30 (1.4 KB)

Indeed at the moment Radzen will list only classes whose base class is "Controller" - the default ASP.NET MVC base class.

Hi ,
Is there any change on this behavior ?
Perhaps better, how to implement Global methods without having to extend the controller base .
e.g. I want to have an email and logging function available to all the controllers , Now I'm invoking a controller having an email method from a controller or have to write / copy this method in each controller.
( if I want the controller and its methods to be seen in Radzen GUI that is )


No, we haven't changed the implementation.

You can use composition instead of inheritance. For example you can create a service class e.g. EmailSender and use them in your controllers. It is a common practice in ASP.NET MVC to register services and inject them in the constructor of the controller (similar to how the Entity Framework context is injected).

Thank you!

I’m aware of the possible solutions, but I was looking for a solution where it was simple to implement this in an existing project without having to modify much on every controller.

Just renaming the controller base is much easier / les afford than extending with the service injection it seemed .