123456789101112131415161718192021222324 |
- using AutoMapper;
- using SysDataLibs.TableClass;
- namespace Gs.TransData.WebApi.Helper
- {
- public class AutoMapConfiguration
- {
- public static void Configure()
- {
- Mapper.Initialize(cfg => { cfg.AddProfile<AutoMapProfile>(); });//增加对 ModelProfile的初始化
- Mapper.AssertConfigurationIsValid();
- }
- }
- public class AutoMapProfile: Profile
- {
- public AutoMapProfile()
- {
- CreateMap<CheckData_info, CheckData>().ForMember(a => a.CardIndex,b=>b.Ignore()).ForMember(a => a.LicenseNo, b => b.Ignore()).ForMember(a => a.IdCode, b => b.Ignore()).ForMember(a => a.UnitName, b => b.Ignore()).ForMember(a => a.PositionNo, b => b.Ignore()).ForMember(a => a.CorpNameName, b => b.Ignore());
- CreateMap<CheckData, CheckData_info>(); ;
- }
- }
- }
|