Skip to content

Commit

Permalink
#1351 Values are now mapping into DynamicProperty from storage accoun…
Browse files Browse the repository at this point in the history
…t transformed files
  • Loading branch information
bolsson committed Oct 2, 2023
1 parent d335a79 commit 6426c82
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions Assessments.Transformation/PublishDynamicProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,21 @@ public class PublishDynamicProperties

public PublishDynamicProperties(IConfiguration configuration)
{
ApplicationOptions applicationOptions = new ApplicationOptions { AlienSpecies2023 = new AlienSpecies2023Options { Enabled = true, IsHearing = true, TransformAssessments = true }, Species2021 = new Species2021Options { TransformAssessments = true } };
ApplicationOptions applicationOptions = new ApplicationOptions
{
AlienSpecies2023 = new AlienSpecies2023Options
{
Enabled = true,
IsHearing = true,
TransformAssessments = true
},
Species2021 = new Species2021Options
{
TransformAssessments = true
}
};

_options = Options.Create(applicationOptions);

//The AutoMapper method AddMaps parameter refers to the assembly files in the Assessment.Mapping project. It will find the maps contained.
var mapperConfiguration = new MapperConfiguration(cfg => cfg.AddMaps(Constants.AssessmentsMappingAssembly));
_mapper = new Mapper(mapperConfiguration);
Expand Down Expand Up @@ -79,10 +91,7 @@ public async Task ImportRedlist2021()
new DynamicProperty.Property() { Name = "EkspertGruppe", Value = x.ExpertCommittee },
new DynamicProperty.Property() { Name = "Område", Value = x.AssessmentArea },
new DynamicProperty.Property() { Name = "Aar", Value = "2021" },
new DynamicProperty.Property()
{
Name = "Url",
Value = "https://artsdatabanken.no/lister/rodlisteforarter/2021/" + x.Id.ToString()
new DynamicProperty.Property() { Name = "Url", Value = "https://artsdatabanken.no/lister/rodlisteforarter/2021/" + x.Id.ToString()
}
}
}
Expand Down

0 comments on commit 6426c82

Please sign in to comment.