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


C# Company.AddLocale方法代码示例

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


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

示例1: CreateCompany

        protected new void CreateCompany()
        {
            var company = new Company("TEST") {Name = "Test", Description = "설명입니다"};
            company.AddMetadata("a", new MetadataValue("A"));
            company.AddMetadata("b", new MetadataValue("B"));
            company.AddLocale(new CultureInfo("en"), new CompanyLocale {Name = "TEST"});
            company.AddLocale(new CultureInfo("ko"), new CompanyLocale {Name = "테스트"});

            Repository<Company>.SaveOrUpdate(company);
        }
开发者ID:debop,项目名称:NAccess,代码行数:10,代码来源:OrganizationSampleFluentModelBuilder.cs

示例2: CompanyTestByHybrid

        public void CompanyTestByHybrid()
        {
            var company = new Company("RWC2") {Name = "RealWeb", Description = "설명입니다"};
            company.AddMetadata("a", new MetadataValue("A"));
            company.AddMetadata("b", new MetadataValue("B"));
            company.AddLocale(new CultureInfo("en"), new CompanyLocale {Name = "REALWEB"});
            company.AddLocale(new CultureInfo("ko"), new CompanyLocale {Name = "리얼웹"});

            new PersistenceSpecification<Company>(UnitOfWork.CurrentSession)
                .VerifyTheMappings(company);
        }
开发者ID:debop,项目名称:NAccess,代码行数:11,代码来源:OrganizationFluentDomainTestFixture.cs

示例3: CompanyTestByUnitOfWork

        public void CompanyTestByUnitOfWork()
        {
            var company = new Company("RWC") {Name = "RealWeb", Description = "설명입니다"};
            company.AddMetadata("a", new MetadataValue("A"));
            company.AddMetadata("b", new MetadataValue("B"));
            company.AddLocale(new CultureInfo("en"), new CompanyLocale {Name = "REALWEB"});
            company.AddLocale(new CultureInfo("ko"), new CompanyLocale {Name = "리얼웹"});

            Repository<Company>.SaveOrUpdate(company);
            UnitOfWork.Current.TransactionalFlush();
            UnitOfWork.Current.Clear();

            var loaded = Repository<Company>.Get(company.Id);
            Assert.AreEqual(company, loaded);

            loaded.LocaleMap.Count.Should().Be(2);
        }
开发者ID:debop,项目名称:NAccess,代码行数:17,代码来源:OrganizationFluentDomainTestFixture.cs


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