Skip to content

Those templates are to be used with the built-in scaffold mechanism in ASP.NET Core.

Notifications You must be signed in to change notification settings

VicTachev/scaffold-templates-core

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 

Repository files navigation

Scaffold Templates for UI for ASP.NET Core

This repository contains scaffold templates that are alternatives to the native .NET Core scaffold templates for web application with MVC and RazorPages.

Getting Started

The scaffolding logic and tools are the same as with the ordinary .NET Core web applications. The main repository and logic for the scaffolding provided by Microsoft is in this repository: https://github.com/aspnet/Scaffolding. The original template files are located here: https://github.com/aspnet/Scaffolding/tree/master/src/VS.Web.CG.Mvc/Templates.

In order to use the scaffolding provided by Microsoft you can follow these resources:

Installing the Kendo UI for ASP.NET Core Scaffold templates

Make sure that Telerik UI for ASP.NET Core is installed and set up in your project.

In order to install the scaffold templates from this repository just copy the Templates folder and include it in the root of the created project:

adding templates

As of .NET Core 2.2, when using Bootstrap 3, the views folder used is ViewGenerator_Versioned\Bootstrap3\. If you are upgrading your project make sure to update the folder's name.

Make sure to exclude the folder from the project so that those files are not compiled. Or you can add the exclude statement manually in the .csproj file:

  <ItemGroup>
    <Compile Remove="Templates\**" />
    <Content Remove="Templates\**" />
    <EmbeddedResource Remove="Templates\**" />
    <None Remove="Templates\**" />
  </ItemGroup>

Next, using the build-in scaffolding utility will output cshtml generated using the custom templates included. In this case, the inputs generated will be the Telerik UI for ASP.NET Core components corresponding to the type of the field.

  • String: input element with Kendo styles;
  • String(multiline): textarea element with Kendo styles;
  • Number: kendo-numerictextbox tag helper;
  • DateTime: kendo-datetimepicker tag helper;
  • Boolean: Html.Kendo().CheckBoxFor helper.

About

Those templates are to be used with the built-in scaffold mechanism in ASP.NET Core.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 100.0%