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,10 @@
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>($"Entity {typeof(T).Name} with id {id} not found.")
where T : class, IEntity;
}