Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Using the Specification Pattern to Build a Data-Driven Rules Engine. Parent comment
Orm's support expression trees ( eg, nhibernate,...)
So the specifications pattern for my use-case require expression trees.
There are workarounds ofc, but translating specifications to Sql is not the desired use-case of the pattern.
Specifications make it easy to have a 100% equal business filter ( that translate it to Sql through the ORM) and making it testable.
- Specification.AssertAll(resultset, "not all elements are valid according to this specification");
( Using pseudocode )
There are no comments on this comment yet.
Orm's support expression trees ( eg, nhibernate,...)
So the specifications pattern for my use-case require expression trees.
There are workarounds ofc, but translating specifications to Sql is not the desired use-case of the pattern.
Specifications make it easy to have a 100% equal business filter ( that translate it to Sql through the ORM) and making it testable.
- Specification.AssertAll(resultset, "not all elements are valid according to this specification");
( Using pseudocode )