public IDataEntity BuildLARSFrameworkCommonComponent(LARSFrameworkCommonComponent larsFrameworkCommonComponent)
 {
     return(new DataEntity(Attributes.EntityLARSFrameworkCmnComp)
     {
         Attributes = new Dictionary <string, IAttributeData>()
         {
             { Attributes.LARSFrameworkCommonComponentCode, new AttributeData(larsFrameworkCommonComponent.CommonComponent) },
             { Attributes.LARSFrameworkCommonComponentEffectiveFrom, new AttributeData(larsFrameworkCommonComponent.EffectiveFrom) },
             { Attributes.LARSFrameworkCommonComponentEffectiveTo, new AttributeData(larsFrameworkCommonComponent.EffectiveTo) },
         }
     });
 }
Пример #2
0
        public void BuildLARSFrameworkCommonComponent()
        {
            var larsFCC = new LARSFrameworkCommonComponent
            {
                CommonComponent = 1,
                EffectiveFrom   = new DateTime(2019, 8, 1)
            };

            var dataEntity = NewService().BuildLARSFrameworkCommonComponent(larsFCC);

            dataEntity.EntityName.Should().Be("LARS_FrameworkCmnComp");
            dataEntity.Attributes.Should().HaveCount(3);
            dataEntity.Attributes["LARSFrameworkCommonComponentCode"].Value.Should().Be(larsFCC.CommonComponent);
            dataEntity.Attributes["LARSFrameworkCommonComponentEffectiveFrom"].Value.Should().Be(larsFCC.EffectiveFrom);
            dataEntity.Attributes["LARSFrameworkCommonComponentEffectiveTo"].Value.Should().Be(larsFCC.EffectiveTo);
        }
Пример #3
0
 private Data.External.LARS.Model.LARSFrameworkCommonComponent LARSFrameworkCommonComponentFromEntity(LARSFrameworkCommonComponent entity)
 {
     return(new Data.External.LARS.Model.LARSFrameworkCommonComponent
     {
         CommonComponent = entity.CommonComponent,
         EffectiveFrom = entity.EffectiveFrom,
         EffectiveTo = entity.EffectiveTo
     });
 }