Designbest Core Sviluppo: differenze tra le versioni

Da Webmobili Wiki.
Riga 30: Riga 30:
=== Popolamento Region/Province/City ===
=== Popolamento Region/Province/City ===
Attualmente abbiamo importato i dati sporchi così come sono con la seguente query
Attualmente abbiamo importato i dati sporchi così come sono con la seguente query
<div class="mw-collapsible mw-collapsed" style="border:solid 1px;padding:2rem;">
<syntaxhighlight lang="sql">
<syntaxhighlight lang="sql">
INSERT INTO DesignbestCore.dbo.Region
INSERT INTO DesignbestCore.dbo.Region
Riga 79: Riga 80:
INNER JOIN Region ON Province.RegionID = Region.ID
INNER JOIN Region ON Province.RegionID = Region.ID
</syntaxhighlight>
</syntaxhighlight>
</div>

Versione delle 17:23, 14 mar 2022

Goal

Realizzare una versione agile e super performante di Designbest usando le ultime tecnologie Microsoft disponibili (.NET Core 6).

Database

Accorpamento database:

  • Designbest
  • Trovaprodotti

Tabelle

  • Language
  • LocalizedProperty
  • ManufacturerContractType
  • Manufacturer
  • Category
  • CategoryFilter
  • CategoryFilterValue
  • Product
  • ProductCulture
  • ProductBargain
  • ProductBargainCulture

  • Agent
  • ShopNetStatus
  • ShopNet
  • Region
  • Province
  • City

Popolamento Region/Province/City

Attualmente abbiamo importato i dati sporchi così come sono con la seguente query

INSERT INTO DesignbestCore.dbo.Region
SELECT Region.ID,
	CASE
		WHEN Region.CountryID = 3 THEN 1
		WHEN Region.CountryID = 2 THEN 3
		WHEN Region.CountryID = 4 THEN 4
		WHEN Region.CountryID = 1000 THEN 2
	END AS LanguageID,
	Region.Coordinates,
	Region.LocalizerCode,
	RegionCulture.Region AS [Name],
	LOWER(RegionCulture.SEORegion) AS SeoName
FROM Region
	INNER JOIN RegionCulture ON Region.ID = RegionCulture.RegionID


INSERT INTO DesignbestCore.dbo.Province
SELECT Province.ID,
	CASE
		WHEN Province.CountryID = 3 THEN 1
		WHEN Province.CountryID = 2 THEN 3
		WHEN Province.CountryID = 4 THEN 4
		WHEN Province.CountryID = 1000 THEN 2
	END AS LocalizationID,
	Province.Coordinates,
	Province.ProvinceCode,
	Province.RegionID,
	ProvinceCulture.Province AS Name,
	LOWER(ProvinceCulture.SEOProvince) AS SeoName
FROM Province
	INNER JOIN ProvinceCulture ON Province.ID = ProvinceCulture.ProvinceID
	INNER JOIN Region ON Province.RegionID = Region.ID

INSERT INTO DesignbestCore.dbo.City
SELECT City.ID,
	CASE
		WHEN City.CountryID = 3 THEN 1
		WHEN City.CountryID = 2 THEN 3
		WHEN City.CountryID = 4 THEN 4
		WHEN City.CountryID = 1000 THEN 2
	END AS LocalizationID,
	City.ProvinceID,
	City.City AS [Name],
	LOWER(City.SeoCity) AS SeoName
FROM City
	INNER JOIN Province ON Province.ID = City.ProvinceID
	INNER JOIN Region ON Province.RegionID = Region.ID