Those templates are to be used with the built-in scaffold mechanism in ASP.NET Core.
Перейти к файлу
Ed Charbeneau a1e59fec0f Added controller scaffolding. There is no more user need for copy/paste to complete the scaffolding process. 2019-02-18 12:54:14 -05:00
Templates Added controller scaffolding. There is no more user need for copy/paste to complete the scaffolding process. 2019-02-18 12:54:14 -05:00
README.md chore: improve readme heading 2018-12-17 20:08:37 +02:00

README.md

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

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.