mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-14 17:54:42 +00:00
Integrate NetTopologySuite and create CoordinateData mapping (#250)
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Dapper" Version="2.1.79" />
|
||||
<PackageReference Include="NetTopologySuite" Version="2.6.0" />
|
||||
<PackageReference Include="NetTopologySuite.IO.SqlServerBytes" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.Data.SqlClient" Version="7.0.2" />
|
||||
<PackageReference Include="Microsoft.SqlServer.Types" Version="160.1000.6" />
|
||||
<PackageReference
|
||||
|
||||
@@ -192,13 +192,16 @@ static async Task LoadBreweriesIntoDatabaseAsync(
|
||||
BreweryName = breweryRecord.Brewery.NameEn,
|
||||
Description = breweryRecord.Brewery.DescriptionEn,
|
||||
PostedById = posterUserIds[i % posterUserIds.Count],
|
||||
// TODO: Populate Coordinates from breweryRecord.Address.Latitude/Longitude once it goes through NetTopologySuite (NTS).
|
||||
Location = new BreweryPostLocation
|
||||
{
|
||||
BreweryPostLocationId = Guid.NewGuid(),
|
||||
CityId = cityId,
|
||||
AddressLine1 = breweryRecord.Address.AddressLine1,
|
||||
PostalCode = breweryRecord.Address.PostalCode,
|
||||
Coordinates = new CoordinateData(
|
||||
breweryRecord.Address.Latitude,
|
||||
breweryRecord.Address.Longitude
|
||||
),
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user