private void RegisterServices()
{
container.RegisterType<ISearchService, SearchService>();
container.RegisterType<IProfileService, ProfileService>();
container.RegisterType<IPlaceService, PlaceService>();
}
This is a method from a class that contains Unity registrations. If I generate a new service interface and corresponding implementation then I want to generate a Unity registration for the new pair too.
I don't see how its possible to use partial classes to aggregate several registrations. The code has to go in a method but methods can only be defined once per class - an implementation of a single method can't be spread across partials.
Incidentally, MVC's T4 controller templates do what I'm looking for. They append a DbSet for an entity to a database context somewhere in the solution, which is specified in the template wizard.