Files
Govor/Govor.Data/Repositories/Exceptions/NotFoundByKeyException.cs
T
Artemy 694750e25d Working on the UserRepository functionality
+ Tests
+ QueryableExtensions. It is an add-on that allows you to implement exceptions if the returned List would be empty.
2025-06-17 13:11:56 +07:00

14 lines
449 B
C#

namespace Govor.Data.Repositories.Exceptions;
public class NotFoundByKeyException<T> : NotFoundException
{
public NotFoundByKeyException(T key)
: base($"Not found object by {key}"){}
public NotFoundByKeyException(T id, string message)
: base($"Not found object by {id}. Message: " + message) {}
public NotFoundByKeyException(string message, Exception innerException) : base(message, innerException)
{
}
}