Engine that accepts SQL string in from <Source> where <Expression> select <Field> format and runs query.
Source is one of the properties on the data source (IEnumerable), where Expression is a potentially compound predicate that can include equality, range comparisons, etc.
Exemplary data source :
public class Data
{
public List<User> Users;
public List<Order> Orders;
//etc
}We can use QueryReadTools.ReadQueryFromConsole(bool slowMode) method to grab a Query from the console.
Slow mode format given below:
from Users
where Age > 25 or Age < 60 and FullName = "Denis Ritchie"
select EmailAnd the same query in the normal mode:
from Users where Age > 25 or Age < 60 and FullName = "Denis Ritchie" select EmailOuput is given to the console. In this example using pre-initialized data inside Program.cs, the output should be
[email protected]
----------------------------------------------------------------
[email protected]
----------------------------------------------------------------
[email protected]
----------------------------------------------------------------