/// <summary> /// 生成实体代码 /// </summary> /// <param name="metadata">元数据</param> /// <returns></returns> public CodeData GenerateEntityCode(ProjectMetadata metadata) { var template = GetTemplateCode(metadata, CodeType.Entity); var code = new CodeData() { SourceCode = template, FileName = $"Entity/{metadata.EntityMetadata.EntityName}.cs" }; return(code); }
/// <summary> /// 创建分页Dto代码 /// </summary> /// <param name="metadata"></param> /// <returns></returns> public CodeData GeneratePageDtoCode(ProjectMetadata metadata) { var template = GetTemplateCode(metadata, CodeType.PageListDto); var code = new CodeData() { SourceCode = template, FileName = $"Dtos/{metadata.EntityMetadata.EntityName}PageListDto.cs" }; return(code); }