updating countries
This commit is contained in:
		| @@ -0,0 +1,9 @@ | ||||
| using Domains; | ||||
|  | ||||
| namespace Infrastructure.Database.GeneralExceptions; | ||||
|  | ||||
| /// Exception to throw when entity not found | ||||
| /// <param name="id">Identifier of entity</param> | ||||
| /// <typeparam name="T">Type of entity</typeparam> | ||||
| public class EntityNotFoundByIdException<T>(Guid id) : EntityNotFoundException<T>($"{typeof(T).Name} with id {id} not found.") | ||||
|     where T : class, IEntity; | ||||
| @@ -0,0 +1,9 @@ | ||||
| using ApplicationLayer.GeneralExceptions; | ||||
| using Domains; | ||||
|  | ||||
| namespace Infrastructure.Database.GeneralExceptions; | ||||
|  | ||||
| /// Exception to throw when entity not found | ||||
| /// <typeparam name="T">Not found entity type</typeparam> | ||||
| public class EntityNotFoundException<T>(string message) : ApiException(message) | ||||
|     where T : class, IEntity; | ||||
| @@ -0,0 +1,7 @@ | ||||
| using ApplicationLayer.GeneralExceptions; | ||||
|  | ||||
| namespace Infrastructure.Database.GeneralExceptions | ||||
| { | ||||
|     /// Exception to throw when can't complete some action on entity(delete or something) because it's needed for other entities | ||||
|     public class EntityUsedInDatabaseException(string message) : ApiException(message); | ||||
| } | ||||
		Reference in New Issue
	
	Block a user