2 ms·
Well, then your use-case is different than mine. Since I mostly use specification pattern on top of a orm layer. Orm's support expression trees ( eg, nhibernat
by NicoJuicy 7y ago
Well, then your use-case is different than mine. Since I mostly use specification pattern on top of a orm layer.
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 )