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);
Any idea how to implement this in Orm Lite (4.5.4)?
ServiceStack.OrmLite does not support Union() feature, you should construct SQL by own. You can vote for Unions implementation on ServiceStack uservoice