Skip to content

How to generate SQL without a DataConnection? #4355

Closed Answered by sdanyliv
jzabroski asked this question in Q&A
Discussion options

You must be logged in to vote

Generate SQL for which purposes?
Usually you can just write LINQ query and call ToString()

var query =
   from q in db.GetTable<Some>()
   where q.Id == 1
   select q;

var sql = query.ToString();

It is possible to generate query without DataConnection but i need to understand why.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@sdanyliv
Comment options

@jzabroski
Comment options

@sdanyliv
Comment options

@jzabroski
Comment options

@sdanyliv
Comment options

Answer selected by jzabroski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants