mirror of
https://github.com/meysamhadeli/booking-microservices.git
synced 2026-04-10 17:59:38 +08:00
13 lines
367 B
C#
13 lines
367 B
C#
namespace BuildingBlocks.Exception;
|
|
|
|
public class AggregateNotFoundException : System.Exception
|
|
{
|
|
public AggregateNotFoundException(string typeName, Guid id) : base($"{typeName} with id '{id}' was not found")
|
|
{
|
|
}
|
|
|
|
public static AggregateNotFoundException For<T>(Guid id)
|
|
{
|
|
return new AggregateNotFoundException(typeof(T).Name, id);
|
|
}
|
|
} |