19 lines
503 B
C#
19 lines
503 B
C#
using Solicitors.Core.Data;
|
|
|
|
namespace Solicitors.Core;
|
|
|
|
internal class ReadOnlyCitiesService : IReadOnlyCitiesService
|
|
{
|
|
private readonly IReadOnlyCitiesRepository _repo;
|
|
|
|
public ReadOnlyCitiesService(IReadOnlyCitiesRepository repo)
|
|
{
|
|
_repo = repo;
|
|
}
|
|
|
|
public async Task<string[]> GetAllCitiesAsync(CancellationToken cancellationToken)
|
|
{
|
|
var cities = _repo.GetCitiesAsync(cancellationToken);
|
|
return await cities.ToArrayAsync(cancellationToken);
|
|
}
|
|
} |