%@ Template Language="C#" TargetLanguage="C#" Debug="True" Encoding="UTF-8" %>
<%@ Assembly Src="..\..\..\Common\Model.cs" %>
<%@ Assembly Src="..\..\..\Common\Extensions.cs" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="System.Linq" %>
<%@ Import Namespace="System.Text" %>
<%@ Import Namespace="System.Text.RegularExpressions" %>
<%@ Import Namespace="SchemaMapper" %>
<%@ Property Name="Namespace" Type="System.String" %>
<%@ Property Name="Entity" Type="SchemaMapper.Entity" %>
<%@ Property Name="Schema" Type="System.String" %>
<%-- Safe类名 --%>
<% string SafeClassName = Entity.ClassName.ToSafeName(); %>
<%-- 描述 --%>
<% string Description = Entity.Description; %>
using Util.Ui.Controllers;
using <%= string.Format("{0}.Service.Dtos.{1}",Namespace,Entity.TableSchema) %>;
using <%= string.Format("{0}.Service.Queries.{1}",Namespace,Entity.TableSchema) %>;
using <%= string.Format("{0}.Service.Abstractions.{1}",Namespace,Entity.TableSchema) %>;
namespace <%= Namespace %>.Apis.<%= Schema %> {
///
/// <%= Description %>控制器
///
public class <%= SafeClassName %>Controller : TreeControllerBase<<%= SafeClassName %>Dto, <%= SafeClassName %>Query> {
///
/// 初始化<%= Description %>控制器
///
/// <%= Description %>服务
public <%= SafeClassName %>Controller( I<%= SafeClassName %>Service service ) : base( service ) {
<%= SafeClassName %>Service = service;
}
///
/// <%= Description %>服务
///
public I<%= SafeClassName %>Service <%= SafeClassName %>Service { get; }
}
}