¶Ô±ÈÐÂÎļþ |
| | |
| | |  |
| | | |
| | | using GenerateCode_WeiBen_WMS.Model; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | |
| | | namespace GenerateCode_GEBrilliantFactory |
| | | { |
| | | /// <summary> |
| | | /// çææ¥è¯¢å®ä½ç±» |
| | | /// </summary> |
| | | public class AutoMapperProfile_Generate : BaseGenerate |
| | | { |
| | | public static string CreateText(GenerateCodeParam param) |
| | | { |
| | | var str = TextHelper.ReadText(@"Templete\Application\MapperProfiles\AutoMapperProfile模æ¿.txt"); |
| | | CommonReplace(ref str); |
| | | |
| | | CommonHelper.CommonReplaceStr(param, ref str); |
| | | |
| | | |
| | | return str; |
| | | } |
| | | } |
| | | } |
| | |
| | | <Compile Include="DataBaseFactory\DataBaseServiceFactory.cs" /> |
| | | <Compile Include="DataBaseFactory\Default\SqlServerDataBaseServiceHandle.cs" /> |
| | | <Compile Include="DataBaseFactory\Default\MySqlDataBaseServiceHandle.cs" /> |
| | | <Compile Include="Generate\Application\MapperProfiles\AutoMapperProfile_Generate.cs" /> |
| | | <Compile Include="Generate\AppService\AppService_Generate.cs" /> |
| | | <Compile Include="Generate\AppService\IAppService_Generate.cs" /> |
| | | <Compile Include="Generate\BaseGenerate.cs" /> |
| | |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Content Include="Robot.ico" /> |
| | | <Content Include="Templete\Application\MapperProfiles\AutoMapperProfile模æ¿.txt"> |
| | | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
| | | </Content> |
| | | <Content Include="Templete\AppService\AppService模æ¿.txt"> |
| | | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
| | | </Content> |
| | |
| | | #endregion |
| | | |
| | | |
| | | //36ãçæ AutoMapperProfile æä»¶ |
| | | var autoMapFilePath = tbPath.Text + @"\server\src\CMS.Plugin." + tb_WCF_NameSpacePath.Text.Trim() + @".Application\MapperProfiles"; |
| | | str_generate = AutoMapperProfile_Generate.CreateText(param); |
| | | tf = TextHelper.Export2File_V2(autoMapFilePath, param.EntityName + $"AutoMapperProfile.cs", tableName, str_generate, FileType.InputModel, filePrefixName, entityName, modulelogo); |
| | | |
| | | |
| | | |
| | | ////çæ OutputModel æä»¶ |
| | | //str_generate = OutputModel_Generate.CreateQueryModelLText(modulelogo, chinaComment, columnList, entityName); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using AutoMapper; |
| | | using CMS.Plugin.$NameSpacePath$.Application.Contracts.Dtos.$EntityName$; |
| | | using CMS.Plugin.$NameSpacePath$.Domain.$EntityName$; |
| | | using Volo.Abp.ObjectExtending; |
| | | |
| | | namespace CMS.Plugin.$NameSpacePath$.Application.MapperProfiles; |
| | | |
| | | /// <summary> |
| | | /// $ChinaComment$AutoMapperé
ç½® |
| | | /// </summary> |
| | | /// <seealso cref="AutoMapper.Profile" /> |
| | | public class $EntityName$AutoMapperProfile : Profile |
| | | { |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="$EntityName$AutoMapperProfile"/> class. |
| | | /// </summary> |
| | | public $EntityName$AutoMapperProfile() |
| | | { |
| | | /* You can configure your AutoMapper mapping configuration here. |
| | | * Alternatively, you can split your mapping configurations |
| | | * into multiple profile classes for a better organization. */ |
| | | CreateMap<$EntityName$, $EntityName$Dto>(MemberList.None).MapExtraProperties(MappingPropertyDefinitionChecks.None); |
| | | CreateMap<$EntityName$CreateDto, $EntityName$>(MemberList.None).MapExtraProperties(MappingPropertyDefinitionChecks.None); |
| | | CreateMap<Get$EntityName$Input, $EntityName$>(MemberList.None).MapExtraProperties(MappingPropertyDefinitionChecks.None); |
| | | } |
| | | } |
| | |
| | | using System.ComponentModel.DataAnnotations; |
| | | using System; |
| | | using System.ComponentModel; |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Enums; |
| | | using CMS.Plugin.$NameSpacePath$.Domain.Shared.Enums; |
| | | namespace CMS.Plugin.$NameSpacePath$.Application.Contracts.Dtos.$EntityName$; |
| | | |
| | | /// <summary> |
| | |
| | | */ |
| | | const onExport = (data={}) => { |
| | | //const params = tableRef.value?.getParams() |
| | | exportFile('/api/v1/hIAWms/$PageMenuInstanceName$/export', data, 'hIAWms') |
| | | exportFile('/api/v1/$NameSpacePath$/$PageMenuInstanceName$/export', data, '$NameSpacePath$') |
| | | } |
| | | |
| | | /** |