当前位置: 首页>>代码示例>>C#>>正文


C# AutoPersistenceModel.UseOverridesFromAssemblyOf方法代码示例

本文整理汇总了C#中AutoPersistenceModel.UseOverridesFromAssemblyOf方法的典型用法代码示例。如果您正苦于以下问题:C# AutoPersistenceModel.UseOverridesFromAssemblyOf方法的具体用法?C# AutoPersistenceModel.UseOverridesFromAssemblyOf怎么用?C# AutoPersistenceModel.UseOverridesFromAssemblyOf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AutoPersistenceModel的用法示例。


在下文中一共展示了AutoPersistenceModel.UseOverridesFromAssemblyOf方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Generate

        public AutoPersistenceModel Generate()
        {
            var mappings = new AutoPersistenceModel();

            mappings = AutoMap.AssemblyOf<Domain.Entity>();
            mappings.Where(GetAutoMappingFilter);
            mappings.Conventions.Setup(GetConventions());
            mappings.UseOverridesFromAssemblyOf<AutoPersistenceModelGenerator>();
            mappings.Setup(GetSetup());
            mappings.OverrideAll(x => x.IgnoreProperties(z => z.PropertyType.IsSubclassOf(typeof(Enumeration))));

            mappings.IgnoreBase<Domain.Entity>();
            mappings.UseOverridesFromAssemblyOf<AutoPersistenceModelGenerator>();

            return mappings;
        }
开发者ID:rauhryan,项目名称:warmup-templates,代码行数:16,代码来源:AutoPersistenceModelGenerator.cs

示例2: Generate

 public AutoPersistenceModel Generate()
 {
     var mappings = new AutoPersistenceModel();
     mappings.AddEntityAssembly(typeof (Class1).Assembly).Where(GetAutoMappingFilter);
     mappings.Conventions.Setup(GetConventions());
     mappings.Setup(GetSetup());
     mappings.UseOverridesFromAssemblyOf<AutoPersistenceModelGenerator>();
     return mappings;
 }
开发者ID:jhollingworth,项目名称:Hedgehog,代码行数:9,代码来源:AutoPersistenceModelGenerator.cs

示例3: Generate

 public AutoPersistenceModel Generate()
 {
     var mappings = new AutoPersistenceModel();
     mappings.AddEntityAssembly(typeof(Site).Assembly).Where(GetAutoMappingFilter);
     //    mappings.Setup(GetSetup());
     mappings.IgnoreBase<Entity>();
     mappings.IgnoreBase(typeof(EntityWithTypedId<>));
     mappings.UseOverridesFromAssemblyOf<AutoPersistenceModelGenerator>();
     return mappings;
 }
开发者ID:fudder,项目名称:cs493,代码行数:10,代码来源:AutoPersistenceModelGenerator.cs

示例4: Generate

        public AutoPersistenceModel Generate()
        {
            var mappings = new AutoPersistenceModel();

            mappings.AddEntityAssembly(typeof (Class1).Assembly).Where(GetAutoMappingFilter);
            mappings.Conventions.Setup(GetConventions());
            mappings.Setup(GetSetup());
            mappings.UseOverridesFromAssemblyOf<AutoPersistenceModelGenerator>();

            mappings.Override<Idea>(i => i.Map(m => m.Text).CustomSqlType("TEXT"));
            mappings.Override<Comment>(c => c.Map(m => m.Text).CustomSqlType("TEXT"));

            return mappings;
        }
开发者ID:jhollingworth,项目名称:ideas,代码行数:14,代码来源:AutoPersistenceModelGenerator.cs

示例5: Generate

        public AutoPersistenceModel Generate()
        {
            var mappings = new AutoPersistenceModel();
            mappings.AddEntityAssembly(typeof(Soul).Assembly).Where(GetAutoMappingFilter);
            mappings.Conventions.Setup(GetConventions());
            mappings.Setup(GetSetup());
            mappings.IgnoreBase<Entity>();
            mappings.IgnoreBase(typeof(EntityWithTypedId<>));
            mappings.UseOverridesFromAssemblyOf<AutoPersistenceModelGenerator>();

            // Membershipprovider Automappings
            mappings.AddEntityAssembly(typeof(Shaml.Membership.Core.User).Assembly).Where(GetAutoMappingFilter);
            mappings.Override<Shaml.Membership.Core.User>(map => Shaml.Membership.Data.Overrides.UserOverride(map));
            mappings.Override<Shaml.Membership.Core.Role>(map => Shaml.Membership.Data.Overrides.RoleOverride(map));
            mappings.Override<Shaml.Membership.Core.ProfileData>(map => Shaml.Membership.Data.Overrides.ProfileDataOverride(map));
            mappings.Override<Shaml.Membership.Core.Session>(map => Shaml.Membership.Data.Overrides.SessionOverride(map));

            return mappings;
        }
开发者ID:sztupy,项目名称:CodeChirp,代码行数:19,代码来源:AutoPersistenceModelGenerator.cs


注:本文中的AutoPersistenceModel.UseOverridesFromAssemblyOf方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。