ASP.NET Core 定义Model
using Microsoft.AspNetCore.Html;
using Microsoft.AspNetCore.Mvc.Rendering;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
public class CustomPageModel<T> where T : class
{
public int RecordCount { get; set; }
public int PageIndex { get; set; }
public int PageSize { get; set; }
public List<T> DataList { get; set; }
public string SearchString { get; set; }
}
[HtmlTargetElement("Hello")]
public class CustomTagHelperTest : TagHelper
{
//规则:
//建议在定义属性的时候,首字母大写
public int Id { get; set; }
public string Age { get; set; }
public string Name { get; set; }
public string ZhaoXi { get; set; }
<