Created more proper NotFound exceptions

This commit is contained in:
2024-08-15 18:53:36 +03:00
parent 604081e047
commit 4c3380ee8d
7 changed files with 37 additions and 10 deletions

View File

@@ -0,0 +1,11 @@
using Domains.LocationDomain;
using Infrastructure.Database.GeneralExceptions;
namespace Infrastructure.Database.Locations.Repositories.Cities.Exceptions
{
/// Exception to throw when city cannot be found by its name and its country name
/// <param name="name">Name of the city</param>
/// <param name="countryName">name of the city's country</param>
public class CityNotFoundByNameException(string name, string countryName)
: EntityNotFoundException<City>($"{name} with country {countryName} not found.");
}