private async Task UpdateSpecifications( EquipmentCatalog equipmentCatalog, EquipmentsEdge edge) { if (edge.node.specification != null) { if (edge.node.specification.description != null) { foreach (var description in edge.node.specification.description) { await this.UpdateSpecification ( equipmentCatalog.Id, description.name, description.features ); } } if (edge.node.specification.technical != null) { await this.UpdateSpecification ( equipmentCatalog.Id, "Техническое описание", edge.node.specification.technical ); } } await this.SpecificationsCatalogLoader.ActivateNewSpecificationCatalogAsync(equipmentCatalog.Id); }
private async Task UpdatePricelistsEquipment( EquipmentCatalog equipmentCatalog, EquipmentsEdge edge) { foreach (var color in edge.node.colors) { await UpdatePricelistEquipment(equipmentCatalog, color); } }
private async Task UpdateVersionEquipment( EquipmentCatalog equipmentCatalog, EquipmentsEdge edge) { var versionCatalog = await this.VersionsCatalogLoader.FindOrCreateVersionCatalogAsync(edge); await this.CarContext.FindOrCreateEquipmentVersionCatalogAsync( equipmentCatalog.Id, versionCatalog.Id ); }
public async Task <VersionCatalog> FindOrCreateVersionCatalogAsync(EquipmentsEdge edge) { var makeName = edge.node.modification.model.make.name; var modelName = edge.node.modification.model.name; var versionName = edge.node.version.name; var startProductionYear = edge.node.modification.startProductionYear; var picture = edge.node.picture; return(await FindOrCreateVersionCatalogAsync( makeName, modelName, versionName, startProductionYear, picture)); }
public async Task <EquipmentCatalog> FindOrCreateEquipmentCatalogAsync(EquipmentsEdge edge) { var databaseId = edge.node.databaseId; return(await this.FindOrCreateEquipmentCatalogAsync(databaseId)); }