Skip to content

How to use multiple specs in another #543

@maxime-aubry

Description

@maxime-aubry

Hello

I try to use multiple specs in another, to create a complex spec. Is it possible ?

Thanks :)

public class DuplicateExpenseSpecification : Specification<Expense>
{
    public DuplicateExpenseSpecification(Expense expense)
    {
        ISpecification<Expense> expenseWithAmountSpecification = new ExpenseWithAmountSpecification(expense.Amount);
        ISpecification<Expense> expenseWithCurrencySpecification = new ExpenseWithCurrencySpecification(expense.Currency);
        ISpecification<Expense> expenseWithUserIdSpecification = new ExpenseWithUserIdSpecification(expense.UserId);

        // this.Query...
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions