Skip to content

Redefine WithProjectionOf as an extension to Specification instead of ISpecification #516

@fiseni

Description

@fiseni

In version 9.1.0 (a couple of months ago), we added the WithProjectionOf feature. It's still a kind of experimental feature, and we're keen to get some feedback from consumers and understand how it is being utilized.

I think we made a minor mistake on our first shot. We've defined it as an extension to ISpecification<T>. This doesn't make much sense. The feature is based on the internal mechanics we have, and won't work for any arbitrary user-defined ISpecification<T> implementation. This journey toward spec composition will be heavily based on our internals.

Based on all this, let's rectify the initial mistake and redefine it as an extension to the concrete Specification<T> type.

PS. The ISpecification<T> is literally useless, it causes more problems than it solves, and I wish we didn't have it at all. But it's been there since version 1, and it's hard to remove it now. In my opinion, you should avoid it in your code. Just pass the concrete implementation around. You won't get any benefit just by using the interface.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions