Making Entity framework implement an interface

前端 未结 4 1799
既然无缘
既然无缘 2020-12-09 14:57

I want to use IoC with Entity framework and Ninject. I figure I need the Generated Entity classes to implement an interface, ICRUD. There\'s a walkthrough that shows how t

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-09 15:52

    The interface implementation is to be added to the T4 template while modifying it. It is not shown in the screenshots but it is mentioned as item 13 that the user has to implement the IValidate interface in the T4 template. Once the implementation is provide, the generated classes would have those implementations too.

    User: notes that the generated classes (under the .tt file) implement the IValidate interface as expected

提交回复
热议问题