Does OrmLite will support EXISTS

Does OrmLite support (or will support) EXISTS via lamdba expression?

Sure:

"Have Tracks in 1990: {0}".Print(db.Exists<Track>(x => x.Year == 1990));
"Have Tracks in 1991: {0}".Print(db.Exists<Track>(x => x.Year == 1991));

You can play with this live on Gistlyn.

I mean this EXISTS

select * from t where EXISTS (select id from tn)

sorry for the misunderstanding

1 Like

No for sub expressions we only have Sql.In():

var usaCustomerIds = db.From<Customer>(c => c.Country == "USA").Select(c => c.Id);
var usaCustomerOrders = db.Select(db.From<Order>()
    .Where(x => Sql.In(x.CustomerId, usaCustomerIds)));

Feel free to submit a feature request for it so we can measure interest and get notified when its implemented.