I want to put code that i generate automatically and new classes in different parts of my solution. Ex:
I have these projects:
- Model
- DAO
- Business
- Web
When i create manually a new entity in Model project i want to:
- Create in
Modelproject your IDAO class and IService class - Create in
DAOproject your DAO class. - Create in
Businessproject your Service class. - Create in
Application_Start()method that is inWeb\global.asaxfile the code that register the interfaces to your classes (Denpendency Injection).
All things automatically. So, is it possible?
Solved! I use visual studio macros.
Obs: I changed the strategy. Instead of create a T4 file (.tt), i create a common class file (.cs) with some tags that will be changed by String.Replace.
The Macro: