16 lines
439 B
C#
16 lines
439 B
C#
using Ardalis.Specification;
|
|
using DD.Persistence.Database.Postgres.Extensions;
|
|
|
|
namespace DD.Persistence.Database.Specifications;
|
|
public class OrSpecification<TEntity> : Specification<TEntity>
|
|
{
|
|
public OrSpecification(ISpecification<TEntity> first, ISpecification<TEntity> second)
|
|
{
|
|
var orExpression = first.Or(second);
|
|
if (orExpression == null)
|
|
return;
|
|
|
|
Query.Where(orExpression);
|
|
}
|
|
}
|