Generic Web Api controller to support any model

后端 未结 7 793
南旧
南旧 2020-11-30 09:43

Is it possible to have a generic web api that will support any model in your project?

class BaseApiController :ApiController
{
    private IReposito         


        
7条回答
  •  执念已碎
    2020-11-30 10:36

    It is absolutely possible as said in previous answer. This is good approach and definetely good architecture. But i don't anderstand why your controllers are not public. May be it is your problem and because of it your code didn't work?

提交回复
热议问题