13 lines
366 B
C#
13 lines
366 B
C#
using Ardalis.Specification;
|
|
using BeReadyBackend.Models;
|
|
|
|
namespace BeReadyBackend.Specifications.Users;
|
|
|
|
public class GetUserByCriteriaSpec : SingleResultSpecification<User>
|
|
{
|
|
public GetUserByCriteriaSpec(string username, string email, int? id)
|
|
{
|
|
Query
|
|
.Where(x => (x.Username == username || x.Email == email) && x.Id != id);
|
|
}
|
|
} |