feat: add a not found exception

This commit is contained in:
Polianin Nikita 2024-01-28 04:30:25 +03:00
parent 7a0a51f76a
commit f25c815506

View File

@ -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}\".") { }
}