C# POCO T4 template, generate interfaces?
- by Jonna
Does anyone know of any tweaked version of POCO T4 template that generates interfaces along with classes?
i.e. if I have Movie and Actor entities in .edmx file, I need to get the following classes and interfaces.
interface IMovie
{
string MovieName { get; set; }
ICollection<IActor> Actors { get; set; } //instead of ICollection<Actor>
}
class Movie : IMovie
{
string MovieName { get; set; }
ICollection<IActor> Actors { get; set; } //instead of ICollection<Actor>
}
interface IActor
{
string ActorName { get; set; }
}
class Actor
{
string ActorName { get; set; }
}
Also, just in case I write my own entities, does POCO proxies(I need them for lazy loading) work with the interface declarations as shown above?