mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 11:44:56 +00:00
694750e25d
+ Tests + QueryableExtensions. It is an add-on that allows you to implement exceptions if the returned List would be empty.
14 lines
449 B
C#
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)
|
|
{
|
|
}
|
|
} |