Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

ShouldBeEquivalentTo: exclude a property of all of a list items #500

Copy link
Copy link

Description

@drauch
Issue body actions

Current state of the art:

Maybe far-fetched, but you may even decide to exclude a member on a particular nested object by its index.

 orderDto.ShouldBeEquivalentTo(order, options => options.Excluding(o => o.Products[1].Status)); 

It would be nice to be able to exclude Status for all items in the list. One could use a special index instead for that, e.g., something along the lines of:

orderDto.ShouldBeEquivalentTo(order, options => options.Excluding(o => o.Products[Something.AllItems].Status));

This would be much better than the current workaround (using PropertyPath), as it is refactoring-safe.

Best regards,
D.R.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.