I have a standard class stack in a .NET MVC5 using Entity Framework 6:
MyController()
MyService() : ServiceBase()
ServiceBase() : IServiceBase
All methods/classes are public at the moment.
ServiceBase()
contains generic(T) methods and is inherited by all services.
The problem is that MyController()
can call the generic methods in ServiceBase()
directly. Important properties need to be set on the Entity before being passed to ServiceBase()
.
Is there any way to hide the ServiceBase()
methods from MyController()
forcing MyController()
to go through MyService()
rather than calling ServiceBase()
methods directly?
Thanks all.