Unions implementation for ORM Lite
Hi
In my application user can define multiple filters for specific type. I would like to somehow combine these queries in single one.
SqlExpression<Notice> query1 = Db.From<Notice>(s=>s.param1 == 2);
// ...queries are more complicated but result type is same
SqlExpression<Notice> query2 = Db.From<Notice>(s=>s.param1 == 3 && s.param2 == 3);
SqlExpression<Notice> unionAll = query1.UnionAll(query2);
var result = Db.Select(unionAll);
28
votes
