MireaBackend/Application/Common/Exceptions/RecordExistException.cs

10 lines
450 B
C#

using System;
using System.Reflection;
namespace Mirea.Api.DataAccess.Application.Common.Exceptions;
public class RecordExistException : Exception
{
public RecordExistException(MemberInfo entity, string name, object id) : base($"The entity \"{entity.Name}\" property \"{name}\" exists with id \"{id}\".") { }
public RecordExistException(MemberInfo entity, object id) : base($"The entity \"{entity.Name}\" exists with id \"{id}\".") { }
}