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(Guid id) { return new AggregateNotFoundException(typeof(T).Name, id); } }