Alecu
Alecu

Reputation: 2708

EntityFramework t4 template generate interfaces for each entity

I am trying to change a t4 template to generate an interface file for each entity. I want these entities to implement the generated interfaces. All the properties including the complex properties should be exposed in the interface. Is there some way to do this?

Upvotes: 1

Views: 1648

Answers (1)

Believe2014
Believe2014

Reputation: 3964

Entity Interface Generator

https://entityinterfacegenerator.codeplex.com

This project contains customized T4 templates which can generate interfaces and attributes for the DbContext class and entity classes.

Note: If this answer is correct, please mark it as good answer. Otherwise, it could be wrongly marked as spam due to the use of the external link in most of my answers.

Thanks

Upvotes: 2

Related Questions