start polygon
This commit is contained in:
1 parent
5aca82244e
commit
6e5e25a141
22 files changed
+431
-210
No files matched your search
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using uWine.Core.Domain.Entities;
|
||||
using uWine.Core.Infrastructure.Repository;
|
||||
|
||||
namespace uWine.Core.Infrastructure.Services
|
||||
{
|
||||
public class CoordinatesService
|
||||
{
|
||||
public MariaDbVineyardRepository _vineyardRepository;
|
||||
|
||||
public CoordinatesService(MariaDbVineyardRepository vineyardRepository)
|
||||
{
|
||||
_vineyardRepository = vineyardRepository;
|
||||
}
|
||||
|
||||
public async Task<Coordinates> GetCoordinatesAsync(int vineyardId)
|
||||
{
|
||||
var vineyard = await _vineyardRepository.GetVineyardByIdAsync(vineyardId);
|
||||
if (vineyard == null)
|
||||
{
|
||||
throw new ArgumentException("Vineyard not found");
|
||||
}
|
||||
|
||||
return new Coordinates(vineyard.Latitude, vineyard.Longitude);
|
||||
}
|
||||
|
||||
public async Task<Dictionary<int,Coordinates>> VineyardCoordinates(int vineyardId)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user