partial void PerformanceOutcomeMapperProfileCtor(AutoMapper.IMappingExpression <EfModel.PerformanceOutcome, RefDataNamespace.PerformanceOutcome> d2s); // Enables the constructor to be extended.
partial void RelationshipTypeMapperProfileCtor(AutoMapper.IMappingExpression <EfModel.RelationshipType, RefDataNamespace.RelationshipType> d2s); // Enables the constructor to be extended.
partial void USStateMapperProfileCtor(AutoMapper.IMappingExpression <EfModel.USState, RefDataNamespace.USState> d2s); // Enables the constructor to be extended.
partial void GenderMapperProfileCtor(AutoMapper.IMappingExpression <EfModel.Gender, RefDataNamespace.Gender> d2s); // Enables the constructor to be extended.
partial void TerminationReasonMapperProfileCtor(AutoMapper.IMappingExpression <EfModel.TerminationReason, RefDataNamespace.TerminationReason> d2s); // Enables the constructor to be extended.
partial void MaturityInstructionsMapperProfileCtor(AutoMapper.IMappingExpression <Model.MaturityInstructions, RefDataNamespace.MaturityInstructions> d2s); // Enables the constructor to be extended.
public void Apply <TSource, TDestination>(AutoMapper.IMappingExpression <TSource, TDestination> mappingExpression, string name) { mappingExpression.ForMember(name, opt => opt.Ignore()); }
public void Apply <TSource, TDestination>(AutoMapper.IMappingExpression <TSource, TDestination> mappingExpression, string name) { mappingExpression.ForMember(name, opt => opt.MapFrom(src => DateTime.Now)); }
partial void EfMapperProfileCtor(AutoMapper.IMappingExpression <Person, EfModel.Person> s2d, AutoMapper.IMappingExpression <EfModel.Person, Person> d2s) { // Flatten and unflatten the address. CreateMap <Address, EfModel.Person>().ReverseMap(); s2d.IncludeMembers(s => s.Address); d2s.ForMember(s => s.Address, o => o.MapFrom(d => d)); }
partial void PowerSourceMapperProfileCtor(AutoMapper.IMappingExpression <Model.PowerSource, RefDataNamespace.PowerSource> d2s); // Enables the constructor to be extended.
partial void CosmosMapperProfileCtor(AutoMapper.IMappingExpression <Account, Model.Account> s2d, AutoMapper.IMappingExpression <Model.Account, Account> d2s) { CreateMap <Model.CreditCardAccount, CreditCardAccount>(); CreateMap <Model.TermDepositAccount, TermDepositAccount>(); CreateMap <Model.Balance, Balance>(); CreateMap <Model.BalancePurse, BalancePurse>(); }
partial void CosmosMapperProfileCtor(AutoMapper.IMappingExpression <AccountDetail, Model.Account> s2d, AutoMapper.IMappingExpression <Model.Account, AccountDetail> d2s); // Enables the constructor to be extended.
public static AutoMapper.IMappingExpression <IDictionary, TDestination> ConvertFromDictionary <TDestination>(AutoMapper.IMappingExpression <IDictionary, TDestination> exp, Func <string, string> propertyNameMapper) { foreach (PropertyInfo pi in typeof(TDestination).GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)) { string propertyName = pi.Name; propertyName = propertyNameMapper(propertyName); exp.ForMember(propertyName, cfg => cfg.MapFrom(r => r[propertyName])); } return(exp); }
public static IMappingExpression <TSource, TDestination> IgnoreAllNonExistingSource <TSource, TDestination>(this AutoMapper.IMappingExpression <TSource, TDestination> expression) { foreach (var property in expression.TypeMap.GetUnmappedPropertyNames()) { expression.ForSourceMember(property, opt => opt.Ignore()); } return(expression); }
partial void ProductCategoryMapperProfileCtor(AutoMapper.IMappingExpression <Model.ProductCategory, RefDataNamespace.ProductCategory> d2s); // Enables the constructor to be extended.
public static IMappingExpression <TSource, TDestination> IgnoreAllNonExistingSource <TSource, TDestination>(this AutoMapper.IMappingExpression <TSource, TDestination> expression) { var sourceType = typeof(TSource); var destinationType = typeof(TDestination); var existingMaps = AutoMapper.Mapper.GetAllTypeMaps().First(x => x.SourceType.Equals(sourceType) && x.DestinationType.Equals(destinationType)); foreach (var property in existingMaps.GetUnmappedPropertyNames()) { expression.ForSourceMember(property, opt => opt.Ignore()); } return(expression); }
partial void AccountUTypeMapperProfileCtor(AutoMapper.IMappingExpression <Model.AccountUType, RefDataNamespace.AccountUType> d2s); // Enables the constructor to be extended.
partial void EfMapperProfileCtor(AutoMapper.IMappingExpression <Contact, EfModel.Contact> s2d, AutoMapper.IMappingExpression <EfModel.Contact, Contact> d2s); // Enables the constructor to be extended.
partial void TransactionStatusMapperProfileCtor(AutoMapper.IMappingExpression <Model.TransactionStatus, RefDataNamespace.TransactionStatus> d2s); // Enables the constructor to be extended.
partial void HttpAgentMapperProfileCtor(AutoMapper.IMappingExpression <PostalInfo, Model.PostalInfo> s2d, AutoMapper.IMappingExpression <Model.PostalInfo, PostalInfo> d2s); // Enables the constructor to be extended.