Now comes the frontend . There are several options – Blazor,Angular,React,…. . The main problem is – how to generate JavaScript / TypeScript file where there is not .csproj available ? ( Yes,it is .esproj for javascript integration – however,you cannot add NuGet packages to it )
So the solution is to have another project that,once compiled,generates JS/ TS files . But – why this should not be available for all other projects ? So,instead each project compile itself and then generate the .cs files,let’s have a project that compiles and generates files for all. But this can be applied for each –so we have a generator for each type of classes from database ( table model,context,search,controllers)
Now actual work is done by a powershell file that replaces templates in a .csproj,then runs dotnet ef scaffold for each template. This is the diagram of how it works for you
If you want to try it,download from
https://marketplace.visualstudio.com/items?itemName=ignatandrei.databasetocode and start a new project with DB2Code project
Leave a Reply