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.
This commit is contained in:
Artemy
2025-06-17 13:11:56 +07:00
parent 568b09ba81
commit 694750e25d
7 changed files with 147 additions and 21 deletions
@@ -0,0 +1,14 @@
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)
{
}
}