Category: DB2Code

  • DB2Code – part 8–closing

    From now on the only work to be done is improving step by step the generating code. For example, 1. in the REST API,the code is accessing directly the database- should be an indirection layer 2. Should generate some mock classes to return data – instead of going to database ( or maybe EF In…

  • Db2Code–part 7 – Angular vs React

    Once you have the REACT implementation,you will think that Angular implementation will be a breeze. Not . Some pain points and differences : 1.  Angular have the power of separating components into html code and JS/TS code. While this is a feature for the developer,it becomes hard for code generators  to generate 2 different files…

  • Db2Code–part 6 – implementation details

    Problem 1 More dbContexts I have think that a user can have more than 1 DBContext / database implemented. If there was just only one,it were easy to add a partial to program.cs and register the database DI services.AddDbContext<ApplicationDBContext> in the partial .  However,if each database is generated,how to have this  ? The answer is  …

  • Db2Code–part 5 – testing

    For testing I should find some databases to test to ( and do not forget that generating SELECT  from PK supports just 1 PK,not multiple). Microsoft already show some sample database – you can download from https://github.com/microsoft/sql-server-samples/tree/master/samples/databases . However,those must exists in the moment of running tests – so I have as options: Have an…

  • Db2Code- part 4- Architectural Changes for FrontEnd

    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…

  • Db2Code-part 3- deploy

    Now how to let other developers to modify the connection string from a template? Easy said than done  – create a template for this. This is easier to speak about than to do .  So any project can be transformed into template  – but what about a solution ? Anyway – the starting point is…

  • Db2Code–part 2- architecture

    What we will build you can see here : Each class will have it is own CodeTemplates\EFCore  templates from which will generate the code. Let’s start with ExampleModels : Here will be the class definitions . From the table defintion,the DB2Code will generate 1. A definition of a interface with table columns as properties 2. A…

  • Db2Code–part 1–idea

    From the second year that I have started programming,I find tedious to replicate the tables structure to code and to generate classes and SQL . I started asking questions  – and no one has ever envisaged near me an ORM ( it was not a definition then ). I have made my own ORM  –…

  • TILT–specifications –part 2

    This is an application to store what I have learned today / each day . It will be one note string per day,note will be no more than 140 characters. It has tags – programming,life,and so on. Can add one link to the note. Can be saved on local ( desktop,mobile )or on cloud (…