コード例 #1
0
 partial void PerformanceOutcomeMapperProfileCtor(AutoMapper.IMappingExpression <EfModel.PerformanceOutcome, RefDataNamespace.PerformanceOutcome> d2s); // Enables the constructor to be extended.
コード例 #2
0
 partial void RelationshipTypeMapperProfileCtor(AutoMapper.IMappingExpression <EfModel.RelationshipType, RefDataNamespace.RelationshipType> d2s); // Enables the constructor to be extended.
コード例 #3
0
 partial void USStateMapperProfileCtor(AutoMapper.IMappingExpression <EfModel.USState, RefDataNamespace.USState> d2s); // Enables the constructor to be extended.
コード例 #4
0
 partial void GenderMapperProfileCtor(AutoMapper.IMappingExpression <EfModel.Gender, RefDataNamespace.Gender> d2s); // Enables the constructor to be extended.
コード例 #5
0
 partial void TerminationReasonMapperProfileCtor(AutoMapper.IMappingExpression <EfModel.TerminationReason, RefDataNamespace.TerminationReason> d2s); // Enables the constructor to be extended.
コード例 #6
0
ファイル: ReferenceDataData.cs プロジェクト: ostat/Beef
 partial void MaturityInstructionsMapperProfileCtor(AutoMapper.IMappingExpression <Model.MaturityInstructions, RefDataNamespace.MaturityInstructions> d2s); // Enables the constructor to be extended.
コード例 #7
0
 public void Apply <TSource, TDestination>(AutoMapper.IMappingExpression <TSource, TDestination> mappingExpression, string name)
 {
     mappingExpression.ForMember(name, opt => opt.Ignore());
 }
コード例 #8
0
 public void Apply <TSource, TDestination>(AutoMapper.IMappingExpression <TSource, TDestination> mappingExpression, string name)
 {
     mappingExpression.ForMember(name, opt => opt.MapFrom(src => DateTime.Now));
 }
コード例 #9
0
 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));
 }
コード例 #10
0
 partial void PowerSourceMapperProfileCtor(AutoMapper.IMappingExpression <Model.PowerSource, RefDataNamespace.PowerSource> d2s); // Enables the constructor to be extended.
コード例 #11
0
ファイル: AccountData.cs プロジェクト: ostat/Beef
 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>();
 }
コード例 #12
0
 partial void CosmosMapperProfileCtor(AutoMapper.IMappingExpression <AccountDetail, Model.Account> s2d, AutoMapper.IMappingExpression <Model.Account, AccountDetail> d2s); // Enables the constructor to be extended.
コード例 #13
0
 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);
 }
コード例 #14
0
 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);
 }
コード例 #15
0
ファイル: ReferenceDataData.cs プロジェクト: ostat/Beef
 partial void ProductCategoryMapperProfileCtor(AutoMapper.IMappingExpression <Model.ProductCategory, RefDataNamespace.ProductCategory> d2s); // Enables the constructor to be extended.
コード例 #16
0
            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);
            }
コード例 #17
0
ファイル: ReferenceDataData.cs プロジェクト: ostat/Beef
 partial void AccountUTypeMapperProfileCtor(AutoMapper.IMappingExpression <Model.AccountUType, RefDataNamespace.AccountUType> d2s); // Enables the constructor to be extended.
コード例 #18
0
ファイル: ContactData.cs プロジェクト: Avanade/Beef
 partial void EfMapperProfileCtor(AutoMapper.IMappingExpression <Contact, EfModel.Contact> s2d, AutoMapper.IMappingExpression <EfModel.Contact, Contact> d2s); // Enables the constructor to be extended.
コード例 #19
0
ファイル: ReferenceDataData.cs プロジェクト: ostat/Beef
 partial void TransactionStatusMapperProfileCtor(AutoMapper.IMappingExpression <Model.TransactionStatus, RefDataNamespace.TransactionStatus> d2s); // Enables the constructor to be extended.
コード例 #20
0
 partial void HttpAgentMapperProfileCtor(AutoMapper.IMappingExpression <PostalInfo, Model.PostalInfo> s2d, AutoMapper.IMappingExpression <Model.PostalInfo, PostalInfo> d2s); // Enables the constructor to be extended.