diff --git a/Application/Common/Exceptions/NotFoundException.cs b/Application/Common/Exceptions/NotFoundException.cs new file mode 100644 index 0000000..7cacf74 --- /dev/null +++ b/Application/Common/Exceptions/NotFoundException.cs @@ -0,0 +1,10 @@ +using System.Reflection; +using System; + +namespace Mirea.Api.DataAccess.Application.Common.Exceptions; + +public class NotFoundException : Exception +{ + public NotFoundException(MemberInfo entity, string name, object id) : base($"The entity \"{entity.Name}\" property \"{name}\" was not found by id \"{id}\".") { } + public NotFoundException(MemberInfo entity, object id) : base($"The entity \"{entity.Name}\" was not found by id \"{id}\".") { } +} \ No newline at end of file