updating countries
This commit is contained in:
		| @@ -12,4 +12,7 @@ public sealed class CitiesRepository(IGenericReader reader, IGenericWriter write | ||||
|     { | ||||
|         return base.LoadDomain().Include(c => c.Country); | ||||
|     } | ||||
|  | ||||
|     Task<City?> ICitiesRepository.GetByNameAsync(Guid countryId, string cityName, CancellationToken cancellationToken) | ||||
|         => LoadDomain().SingleOrDefaultAsync(c => c.Country.Id == countryId && c.Name == cityName, cancellationToken); | ||||
| } | ||||
|   | ||||
| @@ -13,9 +13,15 @@ public sealed class CountriesRepository(IGenericReader reader, IGenericWriter wr | ||||
|         return base.LoadDomain().Include(c => c.Cities); | ||||
|     } | ||||
|  | ||||
|     async Task<Country?> ICountriesRepository.FindByName(string countryName, CancellationToken cancellationToken) | ||||
|     async Task<Country?> ICountriesRepository.FindByNameAsync(string countryName, CancellationToken cancellationToken) | ||||
|     { | ||||
|         var result = await LoadDomain().SingleOrDefaultAsync(c => c.Name == countryName, cancellationToken); | ||||
|         return result; | ||||
|     } | ||||
|  | ||||
|     async Task<Country?> ICountriesRepository.FindByIdAsync(Guid id, CancellationToken cancellationToken) | ||||
|     { | ||||
|         var result = await LoadDomain().SingleOrDefaultAsync(c => c.Id == id, cancellationToken); | ||||
|         return result; | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user