How do I use select with multiple tables in a SubSonic query?

I am new to SubSonic and have a query problem. This is my query string

string sql = "SELECT *" +
             " FROM tbl_exrates, tbl_currency" +
             " WHERE date = " + d;
             " AND tbl_exrates.currency = tbl_currency.cid" +
             " AND (cash > 0 OR transfer > 0 OR sell > 0)";

      

How do I convert it to a Query SubSonic string? Does SS support support function?

Thanks!

0


a source to share


3 answers


q = new Select().From(TblExrate.Schema)
        .InnerJoin(TblCurrency.Schema)
        .Where(tbl_exrates.date).IsEqualTo(d)
        .AndExpression(tbl_exrates.cash).IsGreaterThan(0)
        .Or(tbl_exrates.transfer).IsGreaterThan(0)
        .Or(tbl_exrates.cash).IsGreaterThan(0);

      



+3


a source


It looks like you can do fast complex queries in Subsonic:



http://subsonicproject.com/querying/select-queries/

+1


a source


You must follow this link. It has all the selected queries you are looking for.

+1


a source







All Articles