public RiotMappingProfile() { SourceMemberNamingConvention = new LowerUnderscoreNamingConvention(); DestinationMemberNamingConvention = new PascalCaseNamingConvention(); CreateMap <SummonerModel, SummonerViewModel>(); }
public MappingProfile() { SourceMemberNamingConvention = new LowerUnderscoreNamingConvention(); DestinationMemberNamingConvention = new PascalCaseNamingConvention(); ApplyMappingFromAssembly(Assembly.GetExecutingAssembly()); }
public Profiler() { AllowNullDestinationValues = true; SourceMemberNamingConvention = new LowerUnderscoreNamingConvention(); DestinationMemberNamingConvention = new PascalCaseNamingConvention(); SourceMemberNamingConvention = new PascalCaseNamingConvention(); DestinationMemberNamingConvention = new LowerUnderscoreNamingConvention(); CreateMap <cuenta_contable, CuentaContableDTO>() .ForMember(dest => dest.IdCuenta, opt => opt.MapFrom(src => src.cue_cont_id)) .ForMember(dest => dest.NumeroCuenta, opt => opt.MapFrom(src => src.cue_cont_numero)) .ForMember(dest => dest.Descripcion, opt => opt.MapFrom(src => src.cue_cont_descri)) .ForMember(dest => dest.Analisis, opt => opt.MapFrom(src => src.cue_cont_analisis)) .ForMember(dest => dest.Destino, opt => opt.MapFrom(src => src.cue_cont_destino)) .ForMember(dest => dest.Nivel, opt => opt.MapFrom(src => src.cue_cont_nivel)) .ForMember(dest => dest.Nivel, opt => opt.MapFrom(src => src.cue_cont_nivel)) .ForMember(dest => dest.OtrosTributos, opt => opt.MapFrom(src => src.cue_bflag_otros_tributos)) .ForMember(dest => dest.FlagBaseImponible, opt => opt.MapFrom(src => src.cue_bflag_base_imponible)) .ForMember(dest => dest.FlagCentroCosto, opt => opt.MapFrom(src => src.cue_cont_cent_cost)) .ForMember(dest => dest.Usuario, opt => opt.MapFrom(src => src.usuario_registro)) .ForMember(dest => dest.FechaRegistro, opt => opt.MapFrom(src => src.fecha_registro)) .ForMember(dest => dest.TipoCuenta, opt => opt.MapFrom(src => src.cue_cont_tipo)) .ReverseMap(); }
protected override void Configure() { SourceMemberNamingConvention = new PascalCaseNamingConvention(); DestinationMemberNamingConvention = new LowerUnderscoreNamingConvention(); CreateMap <SchemaField, SchemaFieldDto>(); CreateMap <Schema, SchemaDto>(); }
private static INamingConvention GetNamingConvention(NamingConvention namingConvention) { INamingConvention target; switch (namingConvention) { case NamingConvention.Camel: target = new CamelCaseNamingConvention(); break; case NamingConvention.Hyphenated: target = new HyphenatedNamingConvention(); break; case NamingConvention.Pascal: target = new PascalCaseNamingConvention(); break; case NamingConvention.Underscored: target = new UnderscoredNamingConvention(); break; case NamingConvention.Null: target = new NullNamingConvention(); break; default: throw new NotImplementedException(namingConvention.ToString()); } return(target); }
public BindModelToModelProfile() { SourceMemberNamingConvention = new LowerUnderscoreNamingConvention(); DestinationMemberNamingConvention = new PascalCaseNamingConvention(); CreateMap <UserBindModel, User>(); }
protected void ConfigureProfile() { SourceMemberNamingConvention = new PascalCaseNamingConvention(); DestinationMemberNamingConvention = new PascalCaseNamingConvention(); ShouldMapField = field => false; }
public MappingProfile() { SourceMemberNamingConvention = new LowerUnderscoreNamingConvention(); DestinationMemberNamingConvention = new PascalCaseNamingConvention(); //CreateMap<TrackPath, SubscribeChangeLocationEventData>(); CreateMap <AccountRegistrationModel, ApplicationUser>(); }
public ViewModelToDomainMappingProfile() { SourceMemberNamingConvention = new LowerUnderscoreNamingConvention(); DestinationMemberNamingConvention = new PascalCaseNamingConvention(); CreateMap <CategoriaProdutoModel, CategoriaProduto>(); CreateMap <ProdutoModel, Produto>(); }
protected override void Configure() { SourceMemberNamingConvention = new LowerUnderscoreNamingConvention(); DestinationMemberNamingConvention = new PascalCaseNamingConvention(); CreateMap <Project, ProjectViewModel>(); CreateMap <ApplicationUser, UserInfoViewModel>(); CreateMap <ProjectCategory, ProjectCategoryViewModel>(); }
public MyProfile2() { SourceMemberNamingConvention = new PascalCaseNamingConvention(); DestinationMemberNamingConvention = new UpperUnderscoreNamingConvention(); CreateMap <AssetNpaLandDetailDto, ASSET>() .ForPath(dest => dest.NPA.LAND.ADDRESS, mo => mo.MapFrom(src => src.NPALandAddress)); }
public ModelToBindModelProfile() { CreateMap <Users, UsersBindingModels>(); CreateMap <Courses, CoursesBindingModels>(); CreateMap <Enrollments, EnrollmentsBindingModels>(); DestinationMemberNamingConvention = new PascalCaseNamingConvention(); SourceMemberNamingConvention = new LowerUnderscoreNamingConvention(); }
public ProfileConfiguration() { SourceMemberNamingConvention = new PascalCaseNamingConvention(); DestinationMemberNamingConvention = new PascalCaseNamingConvention(); RecognizePrefixes("Get"); AllowNullDestinationValues = true; ConstructorMappingEnabled = true; IncludeSourceExtensionMethods(typeof(Enumerable).Assembly()); }
public ProfileConfiguration() { SourceMemberNamingConvention = new PascalCaseNamingConvention(); DestinationMemberNamingConvention = new PascalCaseNamingConvention(); RecognizePrefixes("Get"); AllowNullDestinationValues = true; ConstructorMappingEnabled = true; IncludeSourceExtensionMethods(typeof (Enumerable).Assembly()); }
public IpStackResponseToEntityProfile() { SourceMemberNamingConvention = new LowerUnderscoreNamingConvention(); DestinationMemberNamingConvention = new PascalCaseNamingConvention(); CreateMap <IpStackResponse, GeolocationModel>(); CreateMap <Common.Responses.IpStack.Language, LanguageModel>(); CreateMap <Common.Responses.IpStack.Location, LocationModel>(); }
public void InvokeToApplyConvertsFromUnderscoredCaseToPascalCase() { const string sourceName = "underscored_case_name"; var namingConvention = new PascalCaseNamingConvention(); string name = namingConvention.Apply(sourceName); Assert.AreEqual("UnderscoredCaseName", name); }
public void InvokeToApplyShouldLeavePascalCaseNameUnmodified() { const string sourceName = "PascalCaseName"; var namingConvention = new PascalCaseNamingConvention(); string name = namingConvention.Apply(sourceName); Assert.AreEqual(sourceName, name); }
static void Main(string[] args) { var conv = new PascalCaseNamingConvention(); string res = conv.Apply("layout"); TocEntry tocRoot = TocEntry.BuildToc("{{site.baseurl}}/", @"C:\everest-docs\docs-src\index.md"); tocRoot.SaveForGijgoTree(@"C:\everest-docs\docs-src\toc.json"); }
public ModelToBindModelProfile() { SourceMemberNamingConvention = new PascalCaseNamingConvention(); DestinationMemberNamingConvention = new LowerUnderscoreNamingConvention(); CreateMap <User, UserBindModel>() .ForMember(u => u.password, opt => opt.Ignore()) .ForMember(u => u.new_password, opt => opt.Ignore()); }
public MyProfile() { SourceMemberNamingConvention = new UpperUnderscoreNamingConvention(); DestinationMemberNamingConvention = new PascalCaseNamingConvention(); CreateMap <ASSET, AssetNpaLandDetailDto>(); //.ForMember(dest => dest.NPALandAddress, mo => mo.MapFrom(src => src.NPA.LAND.ADDRESS)) //.ReverseMap(); }
public IpStackResponseToResponseProfile() { SourceMemberNamingConvention = new LowerUnderscoreNamingConvention(); DestinationMemberNamingConvention = new PascalCaseNamingConvention(); CreateMap <IpStackResponse, GetLocationResponse>(); CreateMap <Common.Responses.IpStack.Language, Common.Responses.Geolocation.Language>(); CreateMap <Common.Responses.IpStack.Location, Common.Responses.Geolocation.Location>(); CreateMap <Common.Responses.IpStack.ResponseInfo, Common.Responses.Geolocation.ResponseInfo>(); }
public PayProfile() { SourceMemberNamingConvention = new PascalCaseNamingConvention(); DestinationMemberNamingConvention = new PascalCaseNamingConvention(); CreateMap <Entities.Pay, app.Paycheck>(); CreateMap <Entities.Earnings, app.Earnings>(); CreateMap <Entities.Deductions, app.Deductions>(); CreateMap <Entities.AmountType, app.PayAmount>(); CreateMap <Entities.PaymentMode, app.PaymentMode>() .ForMember(destination => destination.Id, opt => opt.MapFrom(src => src.PaymentId)); }
public TwitchMappingProfile() { SourceMemberNamingConvention = new LowerUnderscoreNamingConvention(); DestinationMemberNamingConvention = new PascalCaseNamingConvention(); //CreateMap<TokenModel, TopGamesViewModel>(); CreateMap <TopGamesModel, TopGamesViewModel>(); CreateMap <TopGamesModel.Datum, TopGamesViewModel.Datum>(); CreateMap <StreamsModel, StreamsViewModel>(); CreateMap <StreamsModel.Datum, StreamsViewModel.Datum>(); }
public ModelToEntityProfile() { SourceMemberNamingConvention = new PascalCaseNamingConvention(); DestinationMemberNamingConvention = new LowerUnderscoreNamingConvention(); SourceMemberNamingConvention = new LowerUnderscoreNamingConvention(); DestinationMemberNamingConvention = new PascalCaseNamingConvention(); CreateMap <ContractTermDto, HmrContractTerm>(); CreateMap <DistrictDto, HmrDistrict>(); CreateMap <MimeTypeDto, HmrMimeType>(); CreateMap <PartyDto, HmrParty>(); CreateMap <PermissionDto, HmrPermission>(); CreateMap <RegionDto, HmrRegion>(); CreateMap <RoleDto, HmrRole>(); CreateMap <RoleCreateDto, HmrRole>(); CreateMap <RoleUpdateDto, HmrRole>(); CreateMap <RoleSearchDto, HmrRole>(); CreateMap <RoleDeleteDto, HmrRole>(); CreateMap <RolePermissionDto, HmrRolePermission>(); CreateMap <ServiceAreaDto, HmrServiceArea>(); CreateMap <ServiceAreaNumberDto, HmrServiceArea>(); CreateMap <ServiceAreaUserDto, HmrServiceAreaUser>(); CreateMap <SubmissionObjectDto, HmrSubmissionObject>(); CreateMap <SubmissionObjectCreateDto, HmrSubmissionObject>(); CreateMap <SubmissionRowDto, HmrSubmissionRow>(); CreateMap <SubmissionStatusDto, HmrSubmissionStatu>(); CreateMap <UserDto, HmrSystemUser>(); CreateMap <UserCreateDto, HmrSystemUser>(); CreateMap <UserCurrentDto, HmrSystemUser>(); CreateMap <UserSearchDto, HmrSystemUser>(); CreateMap <UserUpdateDto, HmrSystemUser>(); CreateMap <UserDeleteDto, HmrSystemUser>(); CreateMap <UserRoleDto, HmrUserRole>(); CreateMap <SubmissionStreamDto, HmrSubmissionStream>(); }
public DomainProfile() { DestinationMemberNamingConvention = new PascalCaseNamingConvention(); SourceMemberNamingConvention = new UnderscoreCamelCaseNamingConvention(); // map all fields ShouldMapField = fi => false; // don't map any properties ShouldMapProperty = pi => true; // Domain -> Data Maps CreateMap <ShopDomain.Catalog.Product, Product>(); CreateMap <ShopDomain.Catalog.Review, Review>(); }
protected override void Configure() { this.CreateMap <TestDbClass, TestUiClass>(); // 设置源和目标的命名惯例。 // 目标:小写字母与下划线的命名方式. DestinationMemberNamingConvention = new LowerUnderscoreNamingConvention(); // 源: 帕斯卡命名法 SourceMemberNamingConvention = new PascalCaseNamingConvention(); }
protected override void Configure() { // Forward Mapping SourceMemberNamingConvention = new PascalCaseNamingConvention(); DestinationMemberNamingConvention = new MyUpperUnderscoreNamingConvention(); CreateMap <Models.DTO.Country, BSS_DataAccess.Country>(); // Reverse Mapping SourceMemberNamingConvention = new MyUpperUnderscoreNamingConvention(); DestinationMemberNamingConvention = new PascalCaseNamingConvention(); CreateMap <BSS_DataAccess.Country, Models.DTO.Country>(); // Mapper.AssertConfigurationIsValid(); }
public EntityToModelProfile() { SourceMemberNamingConvention = new LowerUnderscoreNamingConvention(); DestinationMemberNamingConvention = new PascalCaseNamingConvention(); CreateMap <HmrContractTerm, ContractTermDto>(); CreateMap <HmrDistrict, DistrictDto>(); CreateMap <HmrMimeType, MimeTypeDto>(); CreateMap <HmrParty, PartyDto>(); CreateMap <HmrPermission, PermissionDto>(); CreateMap <HmrRegion, RegionDto>(); CreateMap <HmrRole, RoleDto>(); CreateMap <HmrRole, RoleCreateDto>(); CreateMap <HmrRole, RoleUpdateDto>(); CreateMap <HmrRole, RoleSearchDto>(); CreateMap <HmrRole, RoleDeleteDto>(); CreateMap <HmrRolePermission, RolePermissionDto>(); CreateMap <HmrServiceArea, ServiceAreaDto>(); CreateMap <HmrServiceArea, ServiceAreaNumberDto>(); CreateMap <HmrServiceAreaUser, ServiceAreaUserDto>(); CreateMap <HmrSubmissionObject, SubmissionObjectDto>(); CreateMap <HmrSubmissionObject, SubmissionObjectCreateDto>(); CreateMap <HmrSubmissionRow, SubmissionRowDto>(); CreateMap <HmrSubmissionStatu, SubmissionStatusDto>(); CreateMap <HmrSystemUser, UserDto>(); CreateMap <HmrSystemUser, UserCreateDto>(); CreateMap <HmrSystemUser, UserCurrentDto>(); CreateMap <HmrSystemUser, UserSearchDto>(); CreateMap <HmrSystemUser, UserUpdateDto>(); CreateMap <HmrSystemUser, UserDeleteDto>(); CreateMap <HmrUserRole, UserRoleDto>(); CreateMap <HmrSubmissionStream, SubmissionStreamDto>(); }
protected override void Configure() { SourceMemberNamingConvention = new LowerUnderscoreNamingConvention(); DestinationMemberNamingConvention = new PascalCaseNamingConvention(); CreateMap <UserProfileAdministrationGetAllDto, UserProfile>() .ForMember(dest => dest.CreatedById, opt => opt.MapFrom(src => src.CreatedById)) .ForMember(x => x.CreatedDate, n => n.MapFrom(m => m.CreatedDate)) // .ForMember(x => x.DeletedDate, n => n.MapFrom(m => m.)) .ForMember(x => x.EditedById, n => n.MapFrom(m => m.EditedById)) .ForMember(x => x.Email, n => n.MapFrom(m => m.Email)) .ForMember(x => x.MobilePhone, n => n.MapFrom(m => m.MobilePhone)) .ForMember(x => x.HomePhone, n => n.MapFrom(m => m.HomePhone)) .ForMember(x => x.LastLoginDate, n => n.MapFrom(m => m.LastLoginDate)) .ForMember(x => x.ModifiedDate, n => n.MapFrom(m => m.ModifiedDate)) .ForMember(x => x.RowVersion, n => n.MapFrom(m => m.RowVersion)) .ForMember(x => x.ObjectState, n => n.Ignore()) .ForMember(x => x.TwoFactorSecret, n => n.MapFrom(m => m.TwoFactorSecret)) .ForMember(x => x.UserName, n => n.MapFrom(m => m.UserName)) .ForMember(x => x.UserUid, n => n.MapFrom(m => m.UserUid)) .ForMember(x => x.UserId, n => n.MapFrom(m => m.UserId)) .ReverseMap(); }
/// <summary> /// Contains all Data to Domain Mappings /// </summary> public ProductProfile() { DestinationMemberNamingConvention = new UnderscoreCamelCaseNamingConvention(); SourceMemberNamingConvention = new PascalCaseNamingConvention(); // map all fields ShouldMapField = fi => true; // don't map any properties ShouldMapProperty = pi => false; ShouldUseConstructor = ci => ci.IsPrivate && ci.GetParameters().Length == 0; // Data -> Domain Maps CreateMap <Product, ShopDomain.Catalog.Product>() .ForMember("_reviews", opt => opt.Ignore()); CreateMap <Review, ShopDomain.Catalog.Review>(); //.ForMember("review_id", opts => opts.MapFrom(src => src.ReviewId)) //.ForMember("reviewer", opts => opts.MapFrom(src => src.Reviewer)) //.ForMember("reviewText", opts => opts.MapFrom(src => src.ReviewText)) //.ForMember("reviewDate", opts => opts.MapFrom(src => src.ReviewDate)) //.ForMember("rating", opt => opt.MapFrom(src => src.Rating)); }
protected override void Configure() { SourceMemberNamingConvention = new LowerUnderscoreNamingConvention(); DestinationMemberNamingConvention = new PascalCaseNamingConvention(); CreateMap <TrueVaultResponseDto, TrueVaultResponse>(); CreateMap <InnerErrorDto, InnerError>(); CreateMap <ErrorResponseDto, ErrorResponse>(); #region JSON Store CreateMap <DocumentSaveSuccessResponseDto, DocumentSaveSuccessResponse>(); CreateMap <DocumentGetResponseDto, DocumentResponse>(); CreateMap <MultiDocumentGetResponseDto, MultiDocumentResponse>(); CreateMap <DocumentGetListResponseDto, DocumentGetListResponse>(); CreateMap <DocumentGetListDataDto, DocumentGetListData>(); CreateMap <DocumentGetListItemDto, DocumentGetListItem>(); #endregion CreateMap <SchemaFieldDto, SchemaField>(); //CreateMap<SchemaDto, Schema>(); //CreateMap<SchemaGetResponseDto, SchemaGetResponse>(); //CreateMap<SchemaGetListResponseDto, SchemaGetListResponse>(); //CreateMap<SchemaSaveResponseDto, SchemaSaveResponse>(); //CreateMap<SchemaSaveSuccessResponseDto, SchemaSaveSuccessResponse>(); }
public GamesMappingProfile() { SourceMemberNamingConvention = new LowerUnderscoreNamingConvention(); DestinationMemberNamingConvention = new PascalCaseNamingConvention(); CreateMap <LeagueListingModel, LeagueListingViewModel>(); CreateMap <LiveLeagueGamesModel.Game, LiveLeagueGamesViewModel.Game>(); CreateMap <LiveLeagueGamesModel.Player, LiveLeagueGamesViewModel.Player>(); CreateMap <LiveLeagueGamesModel.Player2, LiveLeagueGamesViewModel.Player2>(); CreateMap <LiveLeagueGamesModel.Dire, LiveLeagueGamesViewModel.Dire>(); CreateMap <LiveLeagueGamesModel.Dire_Team, LiveLeagueGamesViewModel.Dire_Team>(); CreateMap <LiveLeagueGamesModel.Radiant, LiveLeagueGamesViewModel.Radiant>(); CreateMap <LiveLeagueGamesModel.Radiant_Team, LiveLeagueGamesViewModel.Radiant_Team>(); CreateMap <LiveLeagueGamesModel.Ability, LiveLeagueGamesViewModel.Ability>(); CreateMap <LiveLeagueGamesModel.Pick, LiveLeagueGamesViewModel.Pick>(); CreateMap <LiveLeagueGamesModel.Ban, LiveLeagueGamesViewModel.Ban>(); CreateMap <LiveLeagueGamesModel.Scoreboard, LiveLeagueGamesViewModel.Scoreboard>(); CreateMap <MatchDetailsModel, MatchDetailsViewModel>(); CreateMap <PlayerStatsModel, PlayerStatsViewModel>(); CreateMap <TeamInfoModel, TeamInfoViewModel>(); }
public ModelToEntityProfile() { SourceMemberNamingConvention = new PascalCaseNamingConvention(); DestinationMemberNamingConvention = new LowerUnderscoreNamingConvention(); SourceMemberNamingConvention = new LowerUnderscoreNamingConvention(); DestinationMemberNamingConvention = new PascalCaseNamingConvention(); CreateMap <ContractTermDto, HmrContractTerm>(); CreateMap <DistrictDto, HmrDistrict>(); CreateMap <MimeTypeDto, HmrMimeType>(); CreateMap <PartyDto, HmrParty>(); CreateMap <PermissionDto, HmrPermission>(); CreateMap <RegionDto, HmrRegion>(); CreateMap <RoleDto, HmrRole>(); CreateMap <RoleCreateDto, HmrRole>(); CreateMap <RoleUpdateDto, HmrRole>(); CreateMap <RoleSearchDto, HmrRole>(); CreateMap <RoleDeleteDto, HmrRole>(); CreateMap <RolePermissionDto, HmrRolePermission>(); CreateMap <ServiceAreaDto, HmrServiceArea>(); CreateMap <ServiceAreaNumberDto, HmrServiceArea>(); CreateMap <ServiceAreaUserDto, HmrServiceAreaUser>(); CreateMap <SubmissionObjectDto, HmrSubmissionObject>(); CreateMap <SubmissionObjectCreateDto, HmrSubmissionObject>(); CreateMap <SubmissionRowDto, HmrSubmissionRow>(); CreateMap <SubmissionStatusDto, HmrSubmissionStatu>(); CreateMap <UserDto, HmrSystemUser>(); CreateMap <UserCreateDto, HmrSystemUser>(); CreateMap <UserCurrentDto, HmrSystemUser>(); CreateMap <UserSearchDto, HmrSystemUser>(); CreateMap <UserUpdateDto, HmrSystemUser>(); CreateMap <UserDeleteDto, HmrSystemUser>(); CreateMap <UserRoleDto, HmrUserRole>(); CreateMap <SubmissionStreamDto, HmrSubmissionStream>(); CreateMap <ActivityCodeDto, HmrActivityCode>(); CreateMap <ActivityCodeSearchDto, HmrActivityCode>(); CreateMap <ActivityCodeCreateDto, HmrActivityCode>(); CreateMap <ActivityCodeUpdateDto, HmrActivityCode>(); CreateMap <LocationCodeDto, HmrLocationCode>(); CreateMap <WorkReportTyped, HmrWorkReport>(); CreateMap <RockfallReportTyped, HmrRockfallReport>() .ForMember(dst => dst.ReporterName, opt => opt.MapFrom(src => src.Name)); CreateMap <WildlifeReportTyped, HmrWildlifeReport>(); CreateMap <CodeLookupDto, HmrCodeLookup>(); CreateMap <FeedbackMessageDto, HmrFeedbackMessage>(); CreateMap <FeedbackMessageUpdateDto, HmrFeedbackMessage>(); }
public NameSplitMember() { SourceMemberNamingConvention = new PascalCaseNamingConvention(); DestinationMemberNamingConvention = new PascalCaseNamingConvention(); }