MireaBackend/Application/Common/Exceptions/NotFoundException.cs

10 lines
451 B
C#
Raw Permalink Normal View History

2024-01-21 22:52:12 +03:00
using System;
using System.Reflection;
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}\".") { }
}