Hello! to all
I'm starting a project in Console Application in C #, I've read a lot about Entity Framework, Code First, Migrations.
The purpose of this project is to generate all the tables of a database schema in Data Models, I ask your help for this. My doubts are as follows! below:
I want to do the same as the Visual Studio add-in called 'Code First' however I want to generate the models (Model Domain, Model Dto, Model Service) in different paths, the idea of this generator is to automate generation of these Models.
Someone would ask why not use Code First tals, because then, Code First generates everything I need but I want with nomenclatures that I can put when generating the object understand ex:
Database
- ad_escola
- ad_person
- ad_aluno
- ad_professor
Based on the tables I want to generate in an organized way
Data Layer (this will be a Windows Library Project).
- School.cs
-
EscolaMapper.cs
-
Persona.cs
-
PersonaMapper.cs
-
Student.cs
-
StudentMapper.cs
-
Professor.cs
- ProfessorMapper.cs
Domain Layer (will be a Windows Library Project) already with Add, Get, Edit, etc. methods
- School.cs
- Persona.cs
- Student.cs
- Professor.cs
Dto layer (it will be a Windows Library Project).
- Dto.cs
- PersonaDto.cs
- AlunoDto.cs
- ProfessorDto.cs
Service Layer (it will be a Windows Library Project) that returns objects already mounted by the Domain, it will communicate with Front End or Presentation Layer.
- SchoolSevice.cs
- PersonaSevice.cs
- AlunoSevice.cs
- ProfessorSevice.cs
Details, this generator can be used at any stage of the project, if I create a new table in the project, I will use it to generate the Templates for this new table in the database. My question is how can I get all the tables from the bank and generate this in a very simple initial way.
For more information, I created a project in GitHub for those who want to help develop it. talking to me, and working together and the Code Generator, will be for all those who help, it's a great idea from my point of view.
At first I wanted to make him see 3 main databases that are common today:
- SQLServer
- Oracle
- MySql
GitHub data
Those who want to help develop this small project, talk to me and pass me the GitHub user because I will add it as "Contributor from Project", there you can develop and give Commit and the GitHup Repository will always have the latest version updated to all those who contribute.
I await tips, suggestions from the entire community. Hugs.