TrackableEntities.Core.Templates.TypeScript 1.0.0

Customizable Handlebars TypeScript templates for Trackable Entities for EF Core entities.

dotnet new --install TrackableEntities.Core.Templates.TypeScript::1.0.0
This package contains a .NET Core Template Package you can call from the shell/command line.

Trackable Entities for EF Core TypeScript Handlebars Templates

Handlebars templates for EF Core scaffolding to generate client-side TypeScript trackable entities. See TrackableEntities.Core and EntityFrameworkCore.Scaffolding.Handlebars.

Usage

  1. Install Trackable Entities for EF Core TypeScript Handlebars Templates.

    dotnet new -i TrackableEntities.Core.Templates.TypeScript
    
  2. Create a .NET Core Class Library project.

  3. Add Trackable Entities Handlebars templates from the project folder.

    dotnet new te-templates-typescript
    
  4. Add the following NuGet packages to the project.

    • Microsoft.EntityFrameworkCore.Design
    • Microsoft.EntityFrameworkCore.SqlServer
    • TrackableEntities.EF.Core
    • EntityFrameworkCore.Scaffolding.Handlebars
  5. Add a ScaffoldingDesignTimeServices class that implements IDesignTimeServices

    public class ScaffoldingDesignTimeServices : IDesignTimeServices
    {
        public void ConfigureDesignTimeServices(IServiceCollection services)
        {
            // Add Handlebars scaffolding templates
            services.AddHandlebarsScaffolding(ReverseEngineerOptions.EntitiesOnly, LanguageOptions.TypeScript);
        }
    }
    
  6. From the command-prompt execute the following:

    • Be sure to create the NorthwindSlim database in SQL Local DB,
      then run the script from bit.ly/northwindslim.
    dotnet ef dbcontext scaffold "Data Source=(localdb)\MSSQLLocalDB; Initial Catalog=NorthwindSlim; Integrated Security=True" Microsoft.EntityFrameworkCore.SqlServer -o Models -f
    

Trackable Entities for EF Core TypeScript Handlebars Templates

Handlebars templates for EF Core scaffolding to generate client-side TypeScript trackable entities. See TrackableEntities.Core and EntityFrameworkCore.Scaffolding.Handlebars.

Usage

  1. Install Trackable Entities for EF Core TypeScript Handlebars Templates.

    dotnet new -i TrackableEntities.Core.Templates.TypeScript
    
  2. Create a .NET Core Class Library project.

  3. Add Trackable Entities Handlebars templates from the project folder.

    dotnet new te-templates-typescript
    
  4. Add the following NuGet packages to the project.

    • Microsoft.EntityFrameworkCore.Design
    • Microsoft.EntityFrameworkCore.SqlServer
    • TrackableEntities.EF.Core
    • EntityFrameworkCore.Scaffolding.Handlebars
  5. Add a ScaffoldingDesignTimeServices class that implements IDesignTimeServices

    public class ScaffoldingDesignTimeServices : IDesignTimeServices
    {
        public void ConfigureDesignTimeServices(IServiceCollection services)
        {
            // Add Handlebars scaffolding templates
            services.AddHandlebarsScaffolding(ReverseEngineerOptions.EntitiesOnly, LanguageOptions.TypeScript);
        }
    }
    
  6. From the command-prompt execute the following:

    • Be sure to create the NorthwindSlim database in SQL Local DB,
      then run the script from bit.ly/northwindslim.
    dotnet ef dbcontext scaffold "Data Source=(localdb)\MSSQLLocalDB; Initial Catalog=NorthwindSlim; Integrated Security=True" Microsoft.EntityFrameworkCore.SqlServer -o Models -f
    

Release Notes

See https://github.com/TrackableEntities/TrackableEntities.Core.Templates.TypeScript/releases/tag/v1.0.0

Dependencies

This package has no dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.0 184 6/25/2019